Skip to content

feat(escape): separate attribute and text HTML#830

Merged
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/escape-quot
Jan 28, 2024
Merged

feat(escape): separate attribute and text HTML#830
Martin1887 merged 1 commit intopulldown-cmark:masterfrom
notriddle:notriddle/escape-quot

Conversation

@notriddle
Copy link
Collaborator

This adds a function to escape attribute text, which will escape both single and double quotes, and another function used only for text nodes that doesn't.

This is an alternative to #823

Fixes #598

@notriddle notriddle force-pushed the notriddle/escape-quot branch 2 times, most recently from aab8d31 to 0bd0f91 Compare January 27, 2024 19:03
This adds a function to escape attribute text,
which will escape both single and double quotes,
and another function used only for text nodes that doesn't.

Co-authored-by: Martín Pozo <mpozo@protonmail.com>
@notriddle notriddle force-pushed the notriddle/escape-quot branch from 0bd0f91 to 836206c Compare January 27, 2024 19:09
@Martin1887
Copy link
Collaborator

This is better than #823, thanks!

@Martin1887 Martin1887 merged commit 340b2c3 into pulldown-cmark:master Jan 28, 2024
@notriddle notriddle deleted the notriddle/escape-quot branch January 28, 2024 13:50
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.

escape_html: Single quotes not escaped

2 participants