예제 #1
0
 private function bad_protocol_once($string, $allowed_protocols)
 {
     $string2 = preg_split('/:|:|:/i', $string, 2);
     if (isset($string2[1]) && !preg_match('%/\\?%', $string2[0])) {
         $string = TextCleaner::bad_protocol_once2($string2[0]) . trim($string2[1]);
     } else {
         $string = preg_replace_callback('/^((&[^;]*;|[\\sA-Za-z0-9])*)' . '(:|:|&#[Xx]3[Aa];)\\s*/', 'bad_protocol_once2', $string);
     }
     return $string;
 }