Commit dba581cd authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen
Browse files

Merge branch '294-extension-xml-does-not-contain-any-umlauts' into 'develop'

Uses unicode tag in preg_replace to keep umlauts

Closes #294

See merge request t3o/ter!290
parents 3b0cae02 9c02c278
Pipeline #3064 passed with stages
in 6 minutes and 49 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);
Supports Markdown
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