Using a snippet of code like this:
$hook_name="the_content";
global $wp_filter;
var_dump($wp_filter[$hook_name]);
I was able to find a list of all hooked callback functions to the WordPress filter: the_content
.
I then located a few possible culprits, then searched for their function existence.
After narrowing down my list, I came to the conclusion on the hooked callback function causing the problem.
In the file ./wp-includes/default-filters.php
on line 135 as of WordPress 3.6 there is a hooked function add_filter('the_content', 'wptexturize');
In the file ./wp-includes/formatting.php
on line 29 as of WordPress 3.6 there is the function definition of wptexturize()
.
/**
* Replaces common plain text characters into formatted entities
*
* As an example,
* <code>
* 'cause today's effort makes it worth tomorrow's "holiday"...
* </code>
* Becomes:
* <code>
* ’cause today’s effort makes it worth tomorrow’s “holiday”…
* </code>
* Code within certain html blocks are skipped.
*
* @since 0.71
* @uses $wp_cockneyreplace Array of formatted entities for certain common phrases
*
* @param string $text The text to be formatted
* @return string The string replaced with html entities
*/
How to prevent WordPress from formatting the_content
characters into HTML entities?
remove_filter('the_content', 'wptexturize');
Lesson learned. Using that snippet of code at the beginning of this answer will help you to… at a minimum, find all the attached callback functions to a particular WordPress hook. Which is a great start, the rest may take a bit of searching and reading what each callback function does.