Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Escape fenced HTML when sanitization is disabled#3789

Open
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-2667-escape-fenced-html
Open

Escape fenced HTML when sanitization is disabled#3789
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-issue-2667-escape-fenced-html

Conversation

@shriram-svg
Copy link
Copy Markdown

Summary

  • keep raw HTML enabled when preview sanitization is set to NONE
  • still escape regular fenced code content so HTML code blocks preserve literal formatting instead of being parsed as DOM
  • add a regression for multiline fenced HTML attributes with sanitization disabled

Fixes #2667.

Verification

  • npx --yes -p node@20 node node_modules/jest/bin/jest.js tests/lib/markdown.test.js --runInBand --testURL=http://localhost
  • npx --yes -p node@20 node node_modules/eslint/bin/eslint.js browser/lib/markdown.js tests/lib/markdown.test.js
  • git diff --check

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Fenced HTML codeblock reformatting attributes broken out over multiple lines.

2 participants