allinurl Posted October 7, 2008 Share Posted October 7, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.