Repository navigation
Conversation
This was referenced Oct 17, 2026
merryman
force-pushed
the
robin/generated-string-escaping
branch
from
October 21, 2026 06:49
09a91bd to
2977c76
Compare
This was referenced Oct 21, 2026
merryman
force-pushed
the
robin/generated-string-escaping
branch
from
October 29, 2026 14:10
b89d6e2 to
b6cf156
Compare
Escape backslashes in the object inspector's string printer before quotes and newlines. Serialize raw text-and-attribute elements without a separate pre-escaping pass, so generated expressions escape text exactly once. Add an object-inspection round-trip regression.
Escape carriage returns and Unicode line and paragraph separators in the object inspector. Reuse that printer for string.print so backslashes and line terminators are escaped consistently, retaining array recursion and non-string output. Add literal round-trip and label-expression regressions.
Exercise serializeSpec and deserializeExprObj with LF, CRLF and a backslash before a newline. The cases reject the former newline pre-escape as well as the pre-S3 string printer.
merryman
force-pushed
the
robin/generated-string-escaping
branch
from
November 5, 2026 10:46
b6cf156 to
605da60
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated JavaScript could change string contents through incomplete or repeated escaping. The shared string printer now preserves backslashes, quotes, carriage returns, newlines, and Unicode line and paragraph separators, including strings nested in arrays. Multiline values print escaped newline characters rather than JavaScript line continuations, so evaluating the generated expression retains the original line breaks.
Rich-text serialization delegates escaping to the shared printer exactly once. Committed printer and serializer regressions cover string round-trips and formatted labels with LF, CRLF, and a backslash followed by a newline.
Refs #1149. This preserves generated expression contents; the remaining structural reconciliation work stays open.