Skip to content

Commit

Permalink
Fix #31197 for Joomla 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Sep 12, 2013
1 parent 77cdb08 commit 341512f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/joomla/filter/input.php
Expand Up @@ -649,9 +649,9 @@ protected function _decode($source)
}
$source = strtr($source, $ttr);
// Convert decimal
$source = preg_replace('/&#(\d+);/me', "utf8_encode(chr(\\1))", $source); // decimal notation
$source = preg_replace_callback('/&#(\d+);/m', function($m){return utf8_encode(chr($m[1]));}, $source); // decimal notation
// Convert hex
$source = preg_replace('/&#x([a-f0-9]+);/mei', "utf8_encode(chr(0x\\1))", $source); // hex notation
$source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m){return utf8_encode(chr('0x'.$m[1]));}, $source); // hex notation
return $source;
}

Expand Down

2 comments on commit 341512f

@rusiqe
Copy link

@rusiqe rusiqe commented on 341512f Feb 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this helped

@ashik685
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

Please sign in to comment.