1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00
This commit is contained in:
Ryan Cramer
2024-11-01 10:27:29 -04:00
parent 5e91b745e1
commit b2b810f181

View File

@@ -1995,7 +1995,14 @@ class Sanitizer extends Wire {
$value = preg_replace('!</li>\s*<li!is', "$options[separator]<li", $value);
}
}
// replace single less than sign that's not accompanied with a greater than sign
// to something that looks like it, but that strip_tags() wont strip.
// this is to prevent something like "5<10" from getting converted to "5"
if(strpos($value, '<') !== false && strpos($value, '>') === false) {
$value = preg_replace('/<([\w\d])/', '≺$1', $value);
}
// remove tags
$value = trim(strip_tags($value));