Hi,
I am writing a simple script for a client that pulls in their Wordpress blog into their site which uses MODx.
That is not necessarily important to know, except that MODx, seems to EVAL() my Wordpress module.
Easy right? Well, it was until I realized that their Wordpress blog contains php code.
One string in my code is this:
$content = $feeditem->getElementsByTagName('encoded')->item(0)->nodeValue;
And that is the line that gives me trouble. It returns the content of a particular post. Some of which contain php code.
I have tried htmlentities; I've tried eval'ing (which won't work because there is more than just php code); I've tried addslashes.
How do I get the contents of this string and have the eval() which MODx uses ignore this string as php code? Perhaps somehow just see it a raw text?
Thanks, hope that makes sense.