RSS and HTML DOCTYPE objects

I have "ldquo" , "rdquo" and several other objects under my RSS feed. It looks like if I add

<!DOCTYPE rss [ <!ENTITY % HTMLspec PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> %HTMLspec; 

below the xml tag and above the rss tag, then I can include these objects. I added, but it does not work. Does anyone know what I missed? Thanks

+4
source share
3 answers

it seems like many channel readers don’t know what to do with it. I would recommend sticking to numbered entity references. for example, change &ldquo; on &#8220; . You can get the full object link right here from w3c .

In addition, you can read this article and this one , which gives good advice on this topic.

+3
source

Forget the objects. Just use UTF-8 for all characters.

It will work reliably, regardless of whether RSS clients parse XML correctly or not (unfortunately, the latter is not uncommon).

+1
source

Oddly enough, but in RSS instead

&rsquo;

I used

&amp;rsquo;

and it worked in all the browsers that I have (IE, Mozilla, Google Chrome)

+1
source

Source: https://habr.com/ru/post/1277749/


All Articles