WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#8464 closed defect (bug) (fixed)

XML Parsing Error: undefined entity

Reported by: dome90 Owned by: nbachiyski
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

XML Parsing Error: undefined entity
Location: Adresse: http://bueltge.de/comments/feed/
Line Number 8, Column 21:
     <title>Kommentare f&uuml;r bueltge.de [by:ltge.de]</title>
---------------------------^

The problem is the translation of 'on' -> für, so ü = &uuml;

Attachments (2)

no-named-entities-in-comment-feeds.diff (3.7 KB) - added by nbachiyski 5 years ago.
no-named-entities-in-comment-feeds-fix.diff (592 bytes) - added by nbachiyski 5 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 follow-up: DD325 years ago

  • Component changed from Comments to i18n
  • Owner set to nbachiyski

the &uuml; entity is a valid entity, however appears to not be included in the refence list which the XML parser is using.

WP includes a function ent2ncr() which would convert &uuml; to &#252;, would that be a valid solution for this? Or is this not a 'real' problem with WordPress, and the XML parser isnt reconising the non-english entities?

comment:2 in reply to: ↑ 1 nbachiyski5 years ago

Replying to DD32:

the &uuml; entity is a valid entity, however appears to not be included in the refence list which the XML parser is using.

WP includes a function ent2ncr() which would convert &uuml; to &#252;, would that be a valid solution for this? Or is this not a 'real' problem with WordPress, and the XML parser isnt reconising the non-english entities?

The only named entities part of the XML standard are quot, amp, apo, gt and lt, all the others are part of HTML's DTD. ent2ncr was introduced exactly for this reason: add_filter('the_content_rss', 'ent2ncr', 8);

Wrapping all translations in ent2ncr() will do the trick, but I will think of a more general solution. Next time we will surely forget to add it.

comment:3 DD325 years ago

The only named entities part of the XML standard are quot, amp, apo, gt and lt, all the others are part of HTML's DTD.

Ah, For some odd reason i was thinking that XML included the HTML DTD's entities..

comment:5 follow-up: nbachiyski5 years ago

  • Keywords has-patch added; XML Parsing Error removed

comment:6 in reply to: ↑ 5 ; follow-up: dome905 years ago

Replying to nbachiyski:
Will that fix come by update too? Or what should we do?

comment:7 ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10036]) No named entities in comment feeds. Props nbachiyski. fixes #8464

comment:8 in reply to: ↑ 6 nbachiyski5 years ago

Replying to dome90:

Replying to nbachiyski:
Will that fix come by update too? Or what should we do?

If you are ready to wait until middle of next week, it will be in 2.7. If you need it sooner, just apply the patch in the attached file above.

comment:9 nbachiyski5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

A &uuml; sneaked in.

comment:10 ryan5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [10068]) Remove uuml. Props nbachiyski. fixes #8464

Note: See TracTickets for help on using tickets.