Hey everyone,
Ran into an annoying error in converting some EE1.7 code to EE2.3. Since the {exp:html_strip} feature is not longer valid we have an issue where an expression engine variable that contains different types of quotes and brackets, is causing PHP errors since these things are being “injected” into the PHP code without any sort of escaping etc.
Here is an example:
=======================================
Query:
{exp:query sql="Select body from mytable where id=1"}
In PHP:
$body = ‘{body}’;
Where the “body” being returned from the database is something like… ” ( ’ hey ‘’ “” () test ’ ’ ” ” )
======================================
So we’re getting PHP errors caused by the havoc that the new quotes and whatnot introduce. (i.e. unexpected T_STRING).
Any help would be awesome!