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

@@ -1996,6 +1996,13 @@ class Sanitizer extends Wire {
} }
} }
// 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 // remove tags
$value = trim(strip_tags($value)); $value = trim(strip_tags($value));