Skip to content

fix(scan): decode html entities in probe title#354

Merged
vmfunc merged 1 commit into
vmfunc:mainfrom
TBX3D:hunt/passive
Jul 22, 2026
Merged

fix(scan): decode html entities in probe title#354
vmfunc merged 1 commit into
vmfunc:mainfrom
TBX3D:hunt/passive

Conversation

@TBX3D

@TBX3D TBX3D commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

the probe's extracted page title carried raw html entities (Tom &amp; Jerry) instead of the decoded text a browser would render, since there was no entity-decoding step after pulling the <title> text out. decode entities so the title matches the rendered page.

the probe title field is documented as an httpx-style page title, but
extractTitle returned the raw regex capture, so a title like
"Tom &amp; Jerry" was reported verbatim instead of "Tom & Jerry".
run it through html.UnescapeString before trimming so the reported
title matches the rendered page.
@TBX3D
TBX3D requested a review from vmfunc as a code owner July 9, 2026 22:13
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7ea1cd2). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #354   +/-   ##
=======================================
  Coverage        ?   54.72%           
=======================================
  Files           ?       81           
  Lines           ?     6874           
  Branches        ?        0           
=======================================
  Hits            ?     3762           
  Misses          ?     2842           
  Partials        ?      270           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added scan changes to scan engine tests test changes size/xs <10 lines changed labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

pr summary

2 files changed (+5 -2)

category files
go source 2
tests 1

@vmfunc vmfunc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unescape-before-trim is the right order here, an edge entity that decodes to whitespace still gets trimmed. title's display-only so nothing downstream regresses. in.

@vmfunc
vmfunc merged commit c5fed20 into vmfunc:main Jul 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scan changes to scan engine size/xs <10 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants