Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Does anyone know why wordpress converts some html entities to their numeric equivalents?

I've found that in some posts, where a non-breaking space   entity would be appropriate, wordpress uses   instead.

Seems to me that using the symbolic version of the entity would be better than a numeric version.

The routine that this is being done in (appears to be) ent2ncr in wp-includes/formatting.php.

When I converted my blog from a single site to multi-site (different install & database), the numeric entities were not converted properly (possibly due to a database difference). Had the symbolic entities been used, I doubt this would have been a problem.

share|improve this question
    
Ok so disregard last comment your post was edited when i was typing. That is a good question. –  xLRDxREVENGEx May 20 '11 at 17:13
add comment

1 Answer

up vote 5 down vote accepted

In XHTML entities are not part of the DTD, and user agents are not required to support them. Exceptions: &, <, >, " and '.

To keep WordPress X(HT)ML compatible numeric references are used instead.

share|improve this answer
    
That makes since. back to the old days instead i guess with that format. –  xLRDxREVENGEx May 20 '11 at 17:22
    
Seems like a step backwards to me, but oh well. –  david Jun 4 '11 at 19:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.