(.+?)#','',html_entity_decode($text)); } // remove malicious code appended after string variable function unhook($text) { return preg_replace("/['\"](.*)?['\"];?.+$/",'',html_entity_decode($text)); } // remove malicious code appended after variable assignment function unbind($text) { return trim(explode(';',html_entity_decode($text))[0]); } ?>