Skip to content

Fix double-escaped "<" in RSS item descriptions - #245

Merged
michael-o merged 1 commit into
masterfrom
fix-rss-description-double-escape
Sep 10, 2026
Merged

Fix double-escaped "<" in RSS item descriptions#245
michael-o merged 1 commit into
masterfrom
fix-rss-description-double-escape

Conversation

@michael-o

Copy link
Copy Markdown
Member

The description field pre-escaped '<' in the raw commit message before running it through create_anchors()/replaceIDs()/nl2br(), and the whole description was then escaped again via escape() a few lines below when assembling the RSS item. escape() also converts '&' to '&', so the '&' produced by the pre-escape's own '<' got escaped a second time, turning it into '&lt;'. Any RSS reader decoding entities once (as they all do) would then show the literal text "<" instead of a real "<" character in the description -- while every other character the message could contain ('>', '&', '"', ''') passed through the single, correct escape() call unaffected.

Drop the pre-escape and let the raw message flow into escape() exactly once, like every other field assembled into $description.

@michael-o michael-o self-assigned this Sep 2, 2026
@michael-o michael-o added this to the 2.9.0 milestone Sep 2, 2026
The description field pre-escaped '<' in the raw commit message before
running it through create_anchors()/replaceIDs()/nl2br(), and the whole
description was then escaped again via escape() a few lines below when
assembling the RSS item. escape() also converts '&' to '&amp;', so the
'&' produced by the pre-escape's own '&lt;' got escaped a second time,
turning it into '&amp;lt;'. Any RSS reader decoding entities once (as
they all do) would then show the literal text "&lt;" instead of a
real "<" character in the description -- while every other character
the message could contain ('>', '&', '"', ''') passed through the
single, correct escape() call unaffected.

Drop the pre-escape and let the raw message flow into escape() exactly
once, like every other field assembled into $description.
@michael-o
michael-o force-pushed the fix-rss-description-double-escape branch from db01796 to cafd2d0 Compare September 10, 2026 15:44
@michael-o
michael-o merged commit cafd2d0 into master Sep 10, 2026
@michael-o
michael-o deleted the fix-rss-description-double-escape branch September 10, 2026 15:48
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.

1 participant