MDL-49631 fix incorrect whitespace remplacements

This commit is contained in:
Petr Skoda
2015-03-23 17:41:26 +13:00
parent bac2631892
commit 36d5d6d51b
3 changed files with 50 additions and 3 deletions
+1 -1
View File
@@ -1099,7 +1099,7 @@ function clean_param($param, $type) {
// Remove some nasties.
$param = preg_replace('~[[:cntrl:]]|[<>`]~u', '', $param);
// Convert many whitespace chars into one.
$param = preg_replace('/\s+/', ' ', $param);
$param = preg_replace('/\s+/u', ' ', $param);
$param = core_text::substr(trim($param), 0, TAG_MAX_LENGTH);
return $param;