From 42a07bc86c6301078c5085ed595d4a4e962683e7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 19 Mar 2008 11:10:17 +0000 Subject: [PATCH] fixed problem pointed out by lukasz.pilorz(at)allegro.pl --- phpgwapi/inc/class.kses.inc.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.kses.inc.php b/phpgwapi/inc/class.kses.inc.php index 6de6c7b5cb..43e44a7f4b 100644 --- a/phpgwapi/inc/class.kses.inc.php +++ b/phpgwapi/inc/class.kses.inc.php @@ -513,13 +513,12 @@ ############################################################################### function _bad_protocol_once($string) { - return preg_replace( - '/^((&[^;]*;|[\sA-Za-z0-9])*)'. - '(:|:|&#[Xx]3[Aa];)\s*/e', - '\$this->_bad_protocol_once2("\\1")', - $string - ); - return $string; + $string2 = preg_split('/:|:|:/i', $string, 2); + if(isset($string2[1]) && !preg_match('%/\?%',$string2[0])) + { + return $this->_bad_protocol_once2($string2[0]).trim($string2[1]); + } + return ''; } # function _bad_protocol_once