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

Fix: correctly escape text that would otherwise be interpreted as raw HTML and HTML blocks. #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjones1
Copy link

@bjones1 bjones1 commented Jun 2, 2023

See the issues linked below for a good description of the issue. Given readable text in HTML, which renders as
<iframe src="http://www.w3schools.com"></iframe>, the correct Turndown translation is
\<iframe src="http://www.w3schools.com">\</iframe>, but the current behavior is
<iframe src="http://www.w3schools.com"></iframe>.

Closes #106
Closes #261

@bjones1 bjones1 marked this pull request as ready for review June 2, 2023 15:36
@siminino
Copy link

siminino commented Oct 3, 2023

I need this fixed. It will fix an issue in my projects.

@mrdziuban
Copy link
Contributor

I also just encountered this, would love to see it fixed. @martincizek @pavelhoral any chance you could take a look?

@zachleat
Copy link

One more upvote for this PR (and a vouch for it—I tested this one locally and in the @11ty/import project).

Current behavior is a bit dangerous as escaped HTML is converted to unescaped HTML in Turndown output.

zachleat added a commit to zachleat/fork-turndown that referenced this pull request Nov 27, 2024
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.

Incorrectly decoding encoded HTML tags how to keep html entities not be converted
4 participants