Repository navigation
Conversation
Advisory descriptions are GitHub advisory Markdown, up to about 31,000 characters, and were shown as one plain paragraph. The details view now renders headings, lists, code blocks, inline code, bold, italic and HTTP(S) links. Descriptions over 800 characters collapse at a block boundary behind "Read more" / "Show less". The renderer has no dependencies and never uses innerHTML: every node comes from the existing element() and safeLink() helpers, raw HTML stays visible as text, and other link protocols stay plain text. Tables are shown as preformatted text and nested lists are flattened. Co-Authored-By: Claude Fable 5.2 <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.
Problem
About half of the advisories (425 of 821) have a
detailstext written in GitHub advisory Markdown. The popup showed it as one plain paragraph, so###headings, lists and code fences ran together. Some texts are very long: the median is about 1,200 characters and the longest about 31,000.Change
innerHTML. Every node is created with the existingelement()andsafeLink()helpers, so raw HTML in a description stays visible as text and only HTTP(S) links become links.Testing
cd chrome/build && npm test). The new tests cover rendering, unsafe input and the collapse rule. One test runs every description in the repository, plus inputs built to make regular expressions slow, through the renderer with a time limit.04-library-advisoriesscreenshots are updated. The service workers also pick up thenode/lib/retire.jschange from da66c52, which the prebuilt packages on master do not have yet.This is independent of #673. Both rebuild the service workers, so the one merged second needs a rebuild after merging master.
AI-assisted implementation.
🤖 Generated with Claude Code