Problem/Motivation
Text in the 'Privacy info' text, and actually all text in mytube-instance.tpl.php will get umlauts like äüö mangled e.g. instead of 'ü' will be displayed 'ü'
Steps to reproduce
put 'Ihre IP-Adresse wird hierbei an !domain übermittelt.' in the 'Privacy info' text field
Proposed resolution
$out = new DOMDocument('1.0', 'UTF-8');
$out->loadHTML(mb_convert_encoding(theme('mytube_instance', $variables), 'HTML-ENTITIES', 'UTF-8'));
worked as a remedy
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3333597-9.patch | 2.11 KB | mfb |
| #6 | 3333597-6.patch | 2.07 KB | mfb |
Comments
Comment #2
mfb@a8w4 What version of PHP are you using? We should write a test for this case.
Comment #3
mfbIt looks like using the Drupal APIs for manipulating HTML properly should resolve this.
Comment #4
mfbComment #6
mfbComment #8
mfbLooks like we also need to port this to 8.x-1.x
Idk when PHP will finally default to UTF-8 HTML.. but luckily we can just use Drupal APIs..
Comment #9
mfbComment #11
mfbThanks for reporting!
Comment #12
a8w4That's correct - it works this way - genius!
Thank you @mfb for this lightning-fast fix - no need anymore to use a contrib-module with changes - great!