[wp-trac] [WordPress Trac] #31080: GUID should not always be escaped for url in feeds
WordPress Trac
noreply at wordpress.org
Thu Jan 29 01:39:06 UTC 2015
#31080: GUID should not always be escaped for url in feeds
------------------------------------------------+--------------------------
Reporter: CheeseDurger | Owner: stevenkword
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.2
Component: Feeds | Version: trunk
Severity: normal | Resolution:
Keywords: 2nd-opinion dev-feedback has-patch | Focuses: template
------------------------------------------------+--------------------------
Changes (by stevenkword):
* keywords: 2nd-opinion needs-patch dev-feedback => 2nd-opinion dev-
feedback has-patch
* owner: => stevenkword
* status: new => assigned
* milestone: Awaiting Review => 4.2
Comment:
I've attached a patch to change the escaping method when rendering GUIDs.
'the_guid()' is the only effected function which is called 4 times among
the following 4 files: `wp-admin/includes/export.php`, `wp-includes/feed-
atom-comments.php`, `wp-includes/feed-atom.php`, and `wp-includes/feed-
rss2.php`.
The patch replaces the existing `esc_url()` method with `esc_html()`.
This is done because according to the RSS 2.0 specification there is no
syntax specified for this element other than to escape HTML entities.
Spaces, for example, are perfectly valid and could exist for content
created outside of a WordPress environment. As mentioned by the original
author, this could cause a problem for migrated instances and should be
addressed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31080#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list