Skip to content

Sanitize rendered blog and docs HTML#77

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:sanitize-web-html
Jun 15, 2026
Merged

Sanitize rendered blog and docs HTML#77
ralyodio merged 1 commit into
profullstack:masterfrom
phucnguyen1707:sanitize-web-html

Conversation

@phucnguyen1707

Copy link
Copy Markdown
Contributor

Fixes #57 and fixes #63.

This adds a shared sanitizer for rendered web content and uses it before injecting blog post HTML or marked docs HTML into the page. The sanitizer keeps common article markup, links, code blocks, and HTTPS images, while removing scripts, event handlers, javascript: URLs, and unsafe image schemes.

Tested with:

  • npm test --workspace @logicsrc/web
  • npm --workspace @logicsrc/web run build

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​sanitize-html@​2.16.11001007081100
Addedsanitize-html@​2.17.510010010095100

View full report

@ralyodio ralyodio merged commit 59013cf into profullstack:master Jun 15, 2026
5 checks passed
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.

Docs page renders markdown as unsanitized HTML via marked Blog post HTML rendered without sanitization (stored XSS)

2 participants