Skip to content

fix: escape and batch the fixed packages rendering in the vulnerabilities tab #179 - #610

Merged
tdruez merged 2 commits into
mainfrom
179-fixed-packages-html
Nov 4, 2026
Merged

tdruez merged 2 commits into
mainfrom
179-fixed-packages-html

Conversation

@tdruez

@tdruez tdruez commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Issues

Changes

  • Escape the fixed package PURLs from VulnerableCode in the package vulnerabilities tab, using format_html instead of an f-string with mark_safe
  • URL-encode the package_url parameter of the "Add Package" link, so PURLs with several qualifiers are no longer truncated at the first &
  • Fetch the fixed packages with a single query for the whole tab, instead of one query per PURL and per vulnerability
  • Load only the fields needed for rendering with only_rendering_fields
  • Add PackageQuerySet.for_package_urls, matching the PURLs with the same rules as for_package_url
  • Add tests for HTML escaping, multi-qualifier PURLs, query co

…ties tab

Signed-off-by: tdruez <tdruez@aboutcode.org>
…ties tab

Signed-off-by: tdruez <tdruez@aboutcode.org>
@tdruez tdruez changed the title 179 fixed packages html fix: escape and batch the fixed packages rendering in the vulnerabilities tab #179 Nov 4, 2026
@tdruez
tdruez merged commit 25d36a6 into main Nov 4, 2026
8 checks passed
@tdruez
tdruez deleted the 179-fixed-packages-html branch November 4, 2026 09:28
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.

DJC: Revisit the get_fixed_packages_html implementation

1 participant