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