Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-13705

  • Loading branch information...
commit f19e9ea7e73fff08d82cb5f58dc16eedcf047152 1 parent 48b31fc
skodak authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/kses.php
View
10 lib/kses.php
@@ -469,10 +469,12 @@ function kses_bad_protocol_once($string, $allowed_protocols)
# handling whitespace and HTML entities.
###############################################################################
{
- return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'.
- '(:|&#0*58;|&#[Xx]0*3[Aa];)\s*/e',
- 'kses_bad_protocol_once2(\'\\1\', $allowed_protocols)',
- $string);
+ $string2 = preg_split('/:|:|:/i', $string, 2);
+ if(isset($string2[1]) && !preg_match('%/\?%',$string2[0]))
+ {
+ $string = kses_bad_protocol_once2($string2[0],$allowed_protocols).trim($string2[1]);
+ }
+ return $string;
} # function kses_bad_protocol_once
Please sign in to comment.
Something went wrong with that request. Please try again.