Skip to content

Comments

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

Open
Saima422 wants to merge 1 commit intobeautifier: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 intobeautifier:mainfrom
Saima422:fix/2141-unescape-strings-invalid-literals

Conversation

@Saima422
Copy link

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
Copy link

sirati commented Feb 19, 2026

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.

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.

2 participants