1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Fix problem with stringifying missing fields

This commit is contained in:
Jermolene 2015-02-08 18:46:22 +00:00
parent 96f5098f46
commit e18825e897

View File

@ -421,9 +421,9 @@ exports.stringify = function(s) {
* line separator, paragraph separator, and line feed. Any character may
* 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, '\\"') // double quote character
.replace(/'/g, "\\'") // single quote character