I'm using wordpress 4.2.2 and i found a very weird problem. On a plugin i found the plugin author print an output for something like this:
echo ' if (responsiveEntries!=undefined && responsiveEntries.length>0)'."
";
echo ' jQuery.each(responsiveEntries, function(index,obj) {'."
";
echo ' var curw = obj.width != undefined ? obj.width : 0,'."
";
echo ' cura = obj.amount != undefined ? obj.amount : 0;'."
";
......etc
The problem arise on the frontend, when i debug, the output is become something like this:
if (responsiveEntries!=undefined && responsiveEntries.length>0)
jQuery.each(responsiveEntries, function(index,obj) {
var curw = obj.width != undefined ? obj.width : 0,
cura = obj.amount != undefined ? obj.amount : 0;
As you can see.. the character && is replace by the safe character (& #038;).. it brokes the script... i'm wondering how to debug this issue, i already turn off unnecessary plugin and the problem is there.. so i believe its related with the themes or core wordpress
the problem only happen on post or custom post type.. when i put the shortcode on pages.. there's no problem
Any thought ?
It seem there's default filter in wordpress called wp_texturizer() and convert_char() who convert & into &
to solve this, i use
remove_filter ('the_content','wp_texturize'); apply_filter('the_content',$my_content); add_filter ('the_content','wp_texturize');