Fix bug core prestashop on accentued characters in str2url
This commit is contained in:
parent
12a708f713
commit
1f1ffbcdd2
@ -986,10 +986,15 @@ class ToolsCore
|
||||
$str = Tools::replaceAccentedChars($str);
|
||||
|
||||
// Remove all non-whitelist chars.
|
||||
if ($allow_accented_chars)
|
||||
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str);
|
||||
else
|
||||
if ($allow_accented_chars) {
|
||||
// @antadis fix by antadis
|
||||
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]\pL-]/u', '', $str);
|
||||
// @antadis prestashop original version
|
||||
//$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str);
|
||||
}
|
||||
else{
|
||||
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-]/','', $str);
|
||||
}
|
||||
|
||||
$str = preg_replace('/[\s\'\:\/\[\]-]+/', ' ', $str);
|
||||
$str = str_replace(array(' ', '/'), '-', $str);
|
||||
|
Loading…
Reference in New Issue
Block a user