Jump to content

Recommended Posts

Hi,

 

I'm trying to setup the RSS feed for my blog and I'm encountering a problem because my title and content use XHTML entities (accented characters mostly). XML validation says they are not defined and looking around, it seems I can fix this using a DTD inclusion. So I modified the template for RSS 2 to include this right after the <?xml tag:

 

<!DOCTYPE rss [
<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
<!ENTITY % symbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
<!ENTITY % special PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
]> 

 

However, this does not help at all. One thing to note is that if I copy paste the definition for &eagrave

 

<!ENTITY egrave "è"> <!-- latin small letter e with grave, U+00E8 ISOlat1 --> 

 

 

and put it directly in the !DOCTYPE tag, it works and the &eagrave is recognized as a valid entity.

What I would like to avoid is to copy all entities in the rss template.

Can anyone help me out with this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/127455-rss-php-html-entities/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.