Skip to content

fix: keep \u2028, \u2029, \ufeff escaped when unescape_strings is true - #2413

Open
Saima422 wants to merge 1 commit into
beautifier:mainfrom
Saima422:fix/2141-unescape-strings-invalid-literals
Open

fix: keep \u2028, \u2029, \ufeff escaped when unescape_strings is true#2413
Saima422 wants to merge 1 commit into
beautifier:mainfrom
Saima422:fix/2141-unescape-strings-invalid-literals

Conversation

@Saima422

Copy link
Copy Markdown

Description

  • Source branch in your fork has meaningful name (not main)

Fixes Issue: #2141

Before Merge Checklist

These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

  • JavaScript implementation
  • Python implementation (NA if HTML beautifier)
  • Added Tests to data file(s) - N/A
  • Added command-line option(s) - N/A
  • README.md documents new feature/option(s) - N/A

@sirati

sirati commented Feb 19, 2026

Copy link
Copy Markdown

I would like to caution against just doing a band-aid fix on the particular failure case that I have encountered. To do this properly would likely entail to re-escape characters based on their unicode properties, the same way a E6/JS parser would use the Unicode properties to decide what characters create count as a new line, or otherwise have special syntactic meaning.

@bitwiseman

Copy link
Copy Markdown
Member

@sarati
Please provide a test case showing the issue you're talking about.

@bitwiseman bitwiseman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests.

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.

3 participants