Skip to content

fix: escape HTML in image, link, and media components#2718

Merged
Koooooo-7 merged 1 commit intodevelopfrom
fix/xss
Apr 10, 2026
Merged

fix: escape HTML in image, link, and media components#2718
Koooooo-7 merged 1 commit intodevelopfrom
fix/xss

Conversation

@sy-records
Copy link
Copy Markdown
Member

@sy-records sy-records commented Apr 9, 2026

Summary

escape HTML in image, link, and media components to prevent XSS vulnerabilities

Related issue, if any:

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

  • Yes
  • No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docsify-preview Ready Ready Preview, Comment Apr 9, 2026 9:06am

@paulhibbitts
Copy link
Copy Markdown
Member

Thanks @sy-records , but I am not sure how to test this particular fix with codesandbox.

@paulhibbitts
Copy link
Copy Markdown
Member

paulhibbitts commented Apr 9, 2026

Ok @sy-records , I've been able to get a few types of tests going on a non-codesandbox instance:
https://paulhibbitts.github.io/docsify-v5-escaping-html-media/#/

Using the RC-4 files, a red background is produced on all three pages due to injection issues. However, once the build is changed to the PR preview no injection issues are seen. Hope this is of help.

@Koooooo-7 Koooooo-7 merged commit b8f7032 into develop Apr 10, 2026
8 checks passed
@Koooooo-7 Koooooo-7 deleted the fix/xss branch April 10, 2026 03:27
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.

3 participants