1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

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

View File

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