1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00

Bump version to 3.0.159

This commit is contained in:
Ryan Cramer
2020-06-05 14:52:23 -04:00
parent d99abac75c
commit c41987d1db
4 changed files with 20 additions and 6 deletions

View File

@@ -2169,9 +2169,13 @@ class Sanitizer extends Wire {
}
// reductions and replacements
$reductions = array('..' => '.', './' => ' ', ' ' => ' ', '--' => '-');
$reductions = array('..' => '.', './' => ' ', ' ' => ' ');
foreach($reductions as $f => $r) {
while(strpos($value, $f) !== false) $value = str_replace($f, $r, $value);
if(strpos($value, $f) === false) continue;
if(in_array($f, $options['whitelist'])) continue;
do {
$value = str_replace($f, $r, $value);
} while(strpos($value, $f) !== false);
}
$value = trim($value); // trim any kind of whitespace