Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jan 28, 2024

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>
@Martin1887
Copy link
Collaborator

This is better than #823, thanks!

@Martin1887 Martin1887 merged commit 340b2c3 into pulldown-cmark:master Jan 28, 2024
1 check passed
@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