[wp-trac] [WordPress Trac] #3260: XML output (rss, atom, rdf ...) should always use UTF-8 or CDATA for user input
WordPress Trac
noreply at wordpress.org
Fri Jan 27 10:44:44 UTC 2023
#3260: XML output (rss, atom, rdf ...) should always use UTF-8 or CDATA for user
input
--------------------------+-----------------------------
Reporter: deremder | Owner: stevenkword
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Feeds | Version: 2.8.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Comment (by Mte90):
Reading today this ticket, I am wondering if it still an issue.
There is no specification about what kind of unicode is suggested for RSS.
I had to deal with an RSS aggregator and the issue was to generate an RSS
that works with the various input where everyone writes symbols not
supported and so on.
Probably wrap everything with CDATA will simplify many things, but it used
only to avoid parsing as XML the content inside
https://en.wikipedia.org/wiki/CDATA.
To avoid strange symbols, don't work, and it is a matter of unicode.
Said so, as today there is a function that print as example the title
https://github.com/WordPress/wordpress-
develop/blob/0cb8475c0d07d23893b1d73d755eda5f12024585/src/wp-
includes/feed.php#L156 that as a hook.
This function use the wordpress `get_the_title`.
In the case of the description https://github.com/WordPress/wordpress-
develop/blob/0cb8475c0d07d23893b1d73d755eda5f12024585/src/wp-
includes/feed.php#L27 that use
https://developer.wordpress.org/reference/functions/convert_chars/ that
replace with ASCII symbols.
As today I think that the ticket can be closed as it is a bug that doesn't
happens anymore.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/3260#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list