Skip to content

Replace backticks with double JSON.stringify(). - #131

Open
chmac wants to merge 1 commit into
therockstorm:mainfrom
chmac:fix-69-newlines-in-hint
Open

Replace backticks with double JSON.stringify().#131
chmac wants to merge 1 commit into
therockstorm:mainfrom
chmac:fix-69-newlines-in-hint

Conversation

@chmac

@chmac chmac commented Mar 6, 2026

Copy link
Copy Markdown

This fixes #69

Newlines don't get properly encoded. The result of JSON.stringify() is a string, but to embed that string inside an HTML page, it needs to be encoded a second time. Then the \n newlines get converted to \\n so that the \ is preserved.

In my testing this works.

Description

Test plan

Possible regressions or performance implications

Dependencies

Reviewer checklist

  • Code is well-designed and only as complicated as necessary.
  • Good experience for clients of code.
  • Existing use-cases are implemented, not potential future ones (YAGNI).
  • Clear and consistent naming.
  • Comments and documentation are clear, useful, and explain why instead of what.
  • Sensible and attractive UI changes, if any.

@vercel

vercel Bot commented Mar 6, 2026

Copy link
Copy Markdown

@chmac is attempting to deploy a commit to the Rocky Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newline in hint breaks decryption

1 participant