HTML Coded Special Characters in WordPress 2.1
- Posted On: February 6th, 2007
- Filed Under: Uncategorized
- Tagged As:
The other night, while looking at some of the traffic passing through my site, I stumbled upon something strange. Browsing through some of the keywords I found a series of suspicious looking numbers - numbers that were also a bit familiar.
It turns out that something about WordPress 2.1 causes a filter to run through your content and replace certain characters with their HTML Code replacements. While on the surface this isn't much of a change I'm honestly unsure what it can do to SEO or keyword results with Google and the like.
If you're not sure what I mean think about the apostrophe. In plain text the sign would appear like this "'."The Coded Character for an apostrophe ' though is áž—, the result is a series of keywords that could make "it's" look like "it's" which may register differently in keyword searches. The result (across all new posts) was the replacement of every question mark, apostrophe, exclamation and even quotation mark being with a coded character.
For those people seeing strange numbers in their post content there is a solution (which I was given in this thread on WordPress.org.) Simply create a file titled "functions.php" in your theme directory. That file needs only consist of the following code:
<?php
remove_filter('the_content', 'wptexturize');
?>
This will cause WordPress to remove the special filter and publish your post content un-changed.


