Skip to content

fix: resolve double-encoded HTML entities in title and description - #456

Open
Zerthick wants to merge 1 commit into
Guts:mainfrom
Zerthick:fix/double-encoded-html-entities
Open

fix: resolve double-encoded HTML entities in title and description#456
Zerthick wants to merge 1 commit into
Guts:mainfrom
Zerthick:fix/double-encoded-html-entities

Conversation

@Zerthick

Copy link
Copy Markdown

Description

Resolve double-encoded HTML entities (e.g. &, <, >) in RSS feed title and description fields.

MkDocs pre-escapes content, and then Jinja's |e filter escapes again, producing double-encoded entities. Using html.unescape() in Python before template rendering ensures |e performs a single correct escape.

Changes

  • Add html_module.unescape() for title and description in plugin.py
  • Add test fixture with special characters (& < >)
  • Add test verifying no double-encoded entities in output

Split from: #451


💡 AI Contribution Level: 8 — Based on the VisiData AI contribution scale, this was an AI-assisted contribution where the AI performed the code splitting and PR creation with minimal human guidance.

MkDocs pre-escapes content, then Jinja's |e filter escapes again,
producing &amp;amp;, &amp;lt;, &amp;gt;. Use html.unescape() in Python
before template rendering so |e performs a single correct escape.

- Add html_module.unescape() for title and description in plugin.py
- Add test fixture with special characters
- Add test verifying no double-encoded entities
@github-actions github-actions Bot added bug Something isn't working quality Tests, project resiliency, etc. labels Aug 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working quality Tests, project resiliency, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant