#18056 closed defect (bug) (fixed)
dc:creator needs to be escaped in RSS feed
| Reported by: | Nettsentrisk | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Feeds | Version: | 3.2 |
| Severity: | major | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
Description (last modified by )
If the author name contains any special characters, they might end up in the RSS feed unescaped, causing failed feed validation and thus causing problems for many readers.
The code now is:
<dc:creator><?php the_author() ?></dc:creator>
Shouldn't this be:
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
Or:
<dc:creator><?php htmlspecialchars(the_author()) ?></dc:creator>
This might be a result of a custom author plugin not escaping these characters on the way into the database, but Wordpress should handle this more robustly to prevent plugin authors from messing things up like this.
Attachments (2)
Change History (9)
#4
@
13 years ago
the default filters send the_author() through ent2ncr() which is consistent with other fields, the CDATA-wrapping was not consistent though - my new patch reflects that
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: #17767