Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 5 years ago

#8464 closed defect (bug) (fixed)

XML Parsing Error: undefined entity

Reported by: dome90's profile dome90 Owned by: nbachiyski's profile 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 16 years ago.
no-named-entities-in-comment-feeds-fix.diff (592 bytes) - added by nbachiyski 16 years ago.

Download all attachments as: .zip

Change History (13)

#1 follow-up: @DD32
16 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?

#2 in reply to: ↑ 1 @nbachiyski
16 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.

#3 @DD32
16 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..

#5 follow-up: @nbachiyski
16 years ago

  • Keywords has-patch added; XML Parsing Error removed

#6 in reply to: ↑ 5 ; follow-up: @dome90
16 years ago

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

#7 @ryan
16 years ago

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

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

#8 in reply to: ↑ 6 @nbachiyski
16 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.

#9 @nbachiyski
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

A &uuml; sneaked in.

#10 @ryan
16 years ago

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

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

#11 @RavanH
5 years ago

After 10 years, this bug seems to be back in 5.2.1

On a completely fresh install (no plugins, default theme) I added a tag with a ' (single quote) in the title. This converts to &rsquo; in the feed title. This in turn, generates

This feed does not validate.

line 11, column 9: XML parsing error: <unknown>:11:9: undefined entity

for the tag feed on https://validator.w3.org/feed/

See https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2F2607.fr%2Ftag%2Flapostrophe%2Ffeed%2F for example

Last edited 5 years ago by RavanH (previous) (diff)
Note: See TracTickets for help on using tickets.