Repository navigation
Conversation
The CVE record page always showed the plain-text `value` of the CNA description, collapsing its line breaks, lists and indentation. - If the English description has a `text/html` supporting media entry, it is decoded (when base64-encoded), sanitized with DOMPurify using a strict allowlist of formatting, list, table and link elements, and rendered as HTML. Links open in a new tab with `rel="noopener noreferrer nofollow"`. - Otherwise the plain-text description is rendered in a monospace font with `white-space: pre-wrap`, so line breaks, indentation and ASCII diagrams are preserved while long lines still wrap. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the sanitizer options into a constant typed with DOMPurify's `Config`, so misspelled option names are caught at compile time. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CVE record page always shows the plain-text
valueof the CNA description. Line breaks, lists and indentation collapse into a single paragraph, which makes structured descriptions hard to read (e.g. CVE-2025-68161).Changes
text/htmlentry insupportingMedia, it is decoded (whenbase64: true), sanitized with DOMPurify and rendered as HTML. The sanitizer keeps only formatting, list, table and link elements; scripts, event handlers, styles, images, iframes, forms, SVG andjavascript:URLs are removed. Links open in a new tab withrel="noopener noreferrer nofollow".white-space: pre-wrap, so line breaks, indentation and ASCII diagrams are preserved, while long lines still wrap.This adds
dompurifyas a dependency.How to test
<pre>block).Search results still show the plain-text summary.
Screenshots
CVE-2025-68161 (Apache Log4j, HTML):
CVE-2024-49882 (Linux kernel, plain text):
CVE-2025-54920 (Apache Spark, HTML with
<pre>):🤖 Generated with Claude Code