Skip to content

Escape ampersand, less-than, and greater-than in attribute value#6604

Merged
artf merged 1 commit intoGrapesJS:devfrom
nanto:escape-ampersand-in-attr
Sep 12, 2025
Merged

Escape ampersand, less-than, and greater-than in attribute value#6604
artf merged 1 commit intoGrapesJS:devfrom
nanto:escape-ampersand-in-attr

Conversation

@nanto
Copy link
Contributor

@nanto nanto commented Sep 4, 2025

When serializing to HTML code, we should escape ampersand, less-than, and greater-than with character references to keep round-trip conversion and to improve interoperability with latest browsers and other programs.

Fix #6603

@artf
Copy link
Member

artf commented Sep 12, 2025

Thanks @nanto 🙇‍♂️

@artf artf merged commit 3b1b9fa into GrapesJS:dev Sep 12, 2025
3 checks passed
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.

BUG: Ampersand is not escaped in attribute value

2 participants