Using PHP, I have to detect ‘” (single quotation mark followed by double quotation mark) to prevent XSS.
thus, I implemented below function.
function xss_cleaner_new($input_str){
$return_str = preg_replace('/"\'/','&l', &input_str);
return $return_str;
}
However, it seems to detect only (first single quotation mark) rather than (single quotation mark followed by double quotation mark)
How can I detect ‘”(single quotation mark followed by double quotation mark) sucessfully?
Try this: