Skip to content

Commit

Permalink
MDL-11413 I hope now it is correct solution
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 25, 2007
1 parent e2fa911 commit 0352cd2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion lib/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function kses_bad_protocol_once($string, $allowed_protocols)
###############################################################################
{
return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'.
'(:|&#0*58;|&#[Xx]3[Aa];)\s*/e',
'(:|&#0*58;|&#[Xx]0*3[Aa];)\s*/e',
'kses_bad_protocol_once2("\\1", $allowed_protocols)',
$string);
} # function kses_bad_protocol_once
Expand Down
2 changes: 0 additions & 2 deletions lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,6 @@ function clean_text($text, $format=FORMAT_MOODLE) {

/// Remove tags that are not allowed
$text = strip_tags($text, $ALLOWED_TAGS);
$text = str_replace(':', ':', $text);

/// Clean up embedded scripts and , using kses
$text = cleanAttributes($text);
Expand Down Expand Up @@ -1939,7 +1938,6 @@ function cleanAttributes2($htmlArray){
$value = kses_decode_entities($value);
$value = preg_replace('/(&#[0-9]+)(;?)/', "\\1;", $value);
$value = preg_replace('/(&#x[0-9a-fA-F]+)(;?)/', "\\1;", $value);
$value = str_replace(':', '', $value); //better not have these characters in output at all
if ($value === $prevvalue) {
$arreach['value'] = $value;
break;
Expand Down

0 comments on commit 0352cd2

Please sign in to comment.