i think there may be a definite bug in the parsing/highlighting engine, when it comes to escaping backslashes:
any code after the function (which is supposed to double backslashes in a string and to escape single quotes):
Code: Select all
function for_sql($val)
{
return str_replace("'", "\'", str_replace('\', "\\\\", $val));
}
When I change the code to the equivalent:
Code: Select all
function for_sql($val)
{
return str_replace("'", "\'", str_replace(chr(0x5C), chr(0x5C) .chr(0x5C), $val));
}
But, of course, writing things this way is REALLY cumbersome: can this be fixed?
Thanx & Regards,
Torsten