Commit 9c02c278 authored by Thomas Löffler's avatar Thomas Löffler

Uses unicode tag in preg_replace to keep umlauts

parent c755d1df
Pipeline #3025 passed with stages
in 4 minutes and 10 seconds
......@@ -527,7 +527,7 @@ class tx_ter_helper
public function xmlentities($string)
{
// Until I have found a better solution for guaranteeing valid characters, I use this regex:
$string = (preg_replace('/[^\w\s"%&\[\]\(\)\.\,\;\:\/\?\{\}!\$\-\/\@]/', '', $string));
$string = (preg_replace('/[^\w\s"%&\[\]\(\)\.\,\;\:\/\?\{\}!\$\-\/\@]/u', '', $string));
return str_replace(['&', '"', "'", '<', '>'], ['&amp;', '&quot;', '&apos;', '&lt;', '&gt;'], $string);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment