Any reason these HTML entites just display in plain text?

153 Views Asked by At

I have a BBPress installation on my Wordpress site, and one of the posts includes this lump of text: R&ॐ pH&#127917 and they render like this: "R&ॐpH🎭"

I want it to render like that on my page, but for some reason it just displays in plain text like the first instance above.

I have tried setting the follow HTML meta values in the <head> of my page:

<meta charset="UTF-8"> 
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

And the HTTP headers look like this:

http://redacted.com/forums/topic/slug

GET /forums/topic/they-died-with-their-boots-on/ HTTP/1.1
Host: redacted.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cache-Control: max-age=0

HTTP/1.1 200 OK
Date: Fri, 14 Nov 2014 10:41:32 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.4-14+deb7u14
X-Pingback: http://redacted.com/xmlrpc.php
Link: <http://redacted.com/?p=202>; rel=shortlink
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 5204
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

Not sure what to try next.

Thanks for reading.

1

There are 1 best solutions below

4
On

This has nothing to do with encoding. The &#1234; part is an entitized unicode character (with 1234 being the code-point).

To prevent it being entitized, just replace the ampersand with the ampersand entity: &amp; so your rendered HTML should look like this...

R&amp;&amp;#2384; pH&amp;#127917

...which will then render like this:

R&&#2384; pH&#127917