Closed flihub closed 4 years ago
This issue came also up on our side
In our case, removing ENT_XML1 "Mario Käppeli"
became "Mario Käppeli"
.
So there is some double encoding on this field?!
I guess the problem is, that umlauts are saved as entities in the db. So in the first step we should decode this entities?
I have tested this and it works:
protected function encode($value)
{
$sanitizer = $this->wire('sanitizer');
$value = $sanitizer->text($value, ['maxLength' => 0]);
$value = $sanitizer->unentities($value);
$value = $sanitizer->entities1($value, ENT_QUOTES | ENT_XML1);
return $value;
}
I can confirm this error. @tiefenb 's solution works for me with german umlauts. Ü
becomes Ü
Fixed with 1.0.1
: https://github.com/wanze/SeoMaestro/releases/tag/v1.0.1
using v1.0 and ENT_XML1 with entities1 broke Turkish character "ü".
convert "Tüm" to
"Tüm"
and browser not propery display.https://github.com/wanze/SeoMaestro/blob/7e3c9b4fa89b9a8284d4aede5db350ead510b2e0/src/SeoDataBase.php#L230
changed this line to return $sanitizer->entities1($value, ENT_QUOTES); problem resolved.
php v7.2.19