mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-28 15:08:46 +00:00
Fix problem with stringifying missing fields
This commit is contained in:
parent
96f5098f46
commit
e18825e897
@ -421,9 +421,9 @@ exports.stringify = function(s) {
|
|||||||
* line separator, paragraph separator, and line feed. Any character may
|
* line separator, paragraph separator, and line feed. Any character may
|
||||||
* appear in the form of an escape sequence.
|
* appear in the form of an escape sequence.
|
||||||
*
|
*
|
||||||
* For portability, we also escape escape all non-ASCII characters.
|
* For portability, we also escape all non-ASCII characters.
|
||||||
*/
|
*/
|
||||||
return s
|
return (s || "")
|
||||||
.replace(/\\/g, '\\\\') // backslash
|
.replace(/\\/g, '\\\\') // backslash
|
||||||
.replace(/"/g, '\\"') // double quote character
|
.replace(/"/g, '\\"') // double quote character
|
||||||
.replace(/'/g, "\\'") // single quote character
|
.replace(/'/g, "\\'") // single quote character
|
||||||
|
Loading…
Reference in New Issue
Block a user