[wp-trac] [WordPress Trac] #47470: XML parsing error: undefined entity (revisited)

WordPress Trac noreply at wordpress.org
Mon Jun 3 23:45:13 UTC 2019


#47470: XML parsing error: undefined entity (revisited)
--------------------------+------------------------------
 Reporter:  RavanH        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Feeds         |     Version:  5.2.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => needs-patch


Comment:

 Replying to [comment:2 RavanH]:
 > Strange, I tested on several other installations and on some the single
 quote gets converted to `’` (invalid) but on others to `’`
 (valid).

 `’` is a [source:tags/5.2.1/src/wp-
 includes/formatting.php?marks=102,103#L101 translatable string] in
 `wptexturize()`, so some locales may have translated it to `’`.

 For feeds, we generally run the content through
 [https://developer.wordpress.org/reference/functions/ent2ncr/ ent2ncr] and
 [source:tags/5.2.1/src/wp-includes/default-filters.php?marks=214-229#L213
 other filters] to prevent this kind of issues. Looks like in addition to
 post titles we have to run it on term titles as well.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47470#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list