Remove erroneous `\s` from field name check

Fixes #5905
This commit is contained in:
jeremy@jermolene.com 2021-07-22 16:55:17 +01:00
parent 6ae78a770f
commit 19fd5ca5f2
1 changed files with 2 additions and 2 deletions

View File

@ -1602,8 +1602,8 @@ $tw.modules.define("$:/boot/tiddlerdeserializer/json","tiddlerdeserializer",{
}
for(var f in data) {
if($tw.utils.hop(data,f)) {
// Check field name doesn't contain whitespace or control characters
if(typeof(data[f]) !== "string" || /[\x00-\x1F\s]/.test(f)) {
// Check field name doesn't contain control characters
if(typeof(data[f]) !== "string" || /[\x00-\x1F]/.test(f)) {
return false;
}
}