I'm using the PHP
include function to include static PHP
and JS
content within my Wordpress pages (made possible with the ezPHP plugin). The PHP is working fine, but the JS isn't. I'm getting "illegal character" errors. Every instance of &&
is being changed to the html code for &&
(I tried including it here, but it renders the character). To try to fix this, I've (1) disabled Wordpress's WYSIWYG editor for my user, (2) under Settings
> Writing
, unchecked "WordPress should correct invalidly nested XHTML automatically", and (3) added the following code to my theme's function.php
:
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
Still I'm getting this error. I'm guessing it has something to do with Wordpress's esc_html()
function, but I don't know how exactly.