You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd expect stringifyObject() to give results similar to JSON.stringify(), in that both should return a valid JavaScript expression. However, both the tab character and the backslash are not escaped, but are copied to the output verbatim.
In the case of the tab character, the resulting code is unexpected but still technically correct.
In the case of the backslash, the resulting code is no valid JavaScript any more, but leaves an unterminated string.
Only the newline character is escaped as expected.
The text was updated successfully, but these errors were encountered:
I believe that
stringify-object
doesn't correctly escape special characters in strings. Consider the following program:I'd expect
stringifyObject()
to give results similar toJSON.stringify()
, in that both should return a valid JavaScript expression. However, both the tab character and the backslash are not escaped, but are copied to the output verbatim.In the case of the tab character, the resulting code is unexpected but still technically correct.
In the case of the backslash, the resulting code is no valid JavaScript any more, but leaves an unterminated string.
Only the newline character is escaped as expected.
The text was updated successfully, but these errors were encountered: