Hello,
how should I clean up a string which contains invalid characters and would break html after printing it in textarea?
PHP's ord() returns 0 for the said character, but I suspect it's not null, which I don't think it matters anyway.
When string is displayed in textarea all text after the invalid character would disappear as well as all html elements after the textarea.
I tried with htmlentities, htmlspecialchars, mb_convert_encoding, iconv('UTF-8', 'UTF-8//IGNORE', $str), but neither of them worked.
filter_var() isn't introduced yet in 5.1.2 which we are using.
echo and var_dump print the character as �