I use strip_tags
public static function fixValue($rvalue)
{
$rvalue = empty($rvalue) && !is_numeric($rvalue) ? NULL : trim(strip_tags($rvalue));
return $rvalue;
}
Of course validate your data and use blade as well.
I'm curious to know what are your preferred methods of sanitizing user input data? I've tried using HTML purifier and found it too difficult to customize and get things working without errors.
Am I missing out on a simpler, yet super reliable solution? Please let me know.
Thank you in advance.
Please or to participate in this conversation.