Opened 16 years ago

Closed 16 years ago

#899 closed Defect (fixed)

Forum RSS feed invalid

Reported by: Nicolas Owned by: davea
Priority: Minor Milestone: Undetermined
Component: Web - Forums Version:
Keywords: Cc:

Description

If a forum post contains an ampersand, it will end in the RSS feed unescaped, which usually would cause an invalid XML entity. Many RSS readers will then fail to load the feed at all.

If a forum post contains an HTML-like tag (like <rant> or <sarcasm>!), it will get removed, and won't show up in the feed.

The attached patch removes the use of strip_tags, and instead, escapes XML-unsafe characters.

Note that the escaping is done twice. If unescaped, the XML parser will interpret it. If escaped once, the feed reader will take it as HTML (that's RSS for ya). So we need double escaping.

Attachments (1)

forum-rss-fix.diff (583 bytes) - added by Nicolas 16 years ago.

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by Nicolas

Attachment: forum-rss-fix.diff added

comment:1 Changed 16 years ago by davea

Resolution: fixed
Status: newclosed

(In [18190]) - web: escape forum RSS entries instead of stripping tags

(from Nicolas; fixes #899)

Note: See TracTickets for help on using tickets.