Error with Special Character Codes for HTML
Fix it > change code
src/addons/SModders/TelegramNotifications/Service/HtmlPurifier.php
from
to
Special Character Codes for HTML: https://www.ou.edu/research/electron/internet/special.shtml
Hàm str_replace: Replace all occurrences of the search string with the replacement string
Fix HTML encoding errors with PHP DOMDocument: https://gist.github.com/xeoncross/9401853
Fix it > change code
src/addons/SModders/TelegramNotifications/Service/HtmlPurifier.php
from
Code:
$this->text = str_replace(' ', '', $newDom->saveHTML());
Code:
$search = array(' ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'à', 'á', 'â', 'ã', 'ä', 'å', 'Æ', 'æ', 'ß', 'Ç', 'ç', 'È', 'É', 'Ê', 'Ë', 'è', 'é', 'ê', 'ë', 'ƒ', 'Ì', 'Í', 'Î', 'Ï', 'ì', 'í', 'î', 'ï', 'Ñ', 'ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'ò', 'ó', 'ô', 'õ', 'ö', 'Ø', 'ø', 'Œ', 'œ', 'Š', 'š', 'Ù', 'Ú', 'Û', 'Ü', 'ù', 'ú', 'û', 'ü', 'µ', '×', 'Ý', 'Ÿ', 'ý', 'ÿ', '°', '†', '‡', '<', '>', '±', '«', '»', '¿', '¡', '·', '•', '™', '©', '®', '§', '¶');
$replace = array( '', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'à', 'á', 'â', 'ã', 'ä', 'å', 'Æ', 'æ', 'ß', 'Ç', 'ç', 'È', 'É', 'Ê', 'Ë', 'è', 'é', 'ê', 'ë', 'ƒ', 'Ì', 'Í', 'Î', 'Ï', 'ì', 'í', 'î', 'ï', 'Ñ', 'ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'ò', 'ó', 'ô', 'õ', 'ö', 'Ø', 'ø', 'Œ', 'œ', 'Š', 'š', 'Ù', 'Ú', 'Û', 'Ü', 'ù', 'ú', 'û', 'ü', 'µ', '×', 'Ý', 'Ÿ', 'ý', 'ÿ', '°', '†', '‡', '±', '«', '»', '¿', '¡', '·', '•', '™', '©', '®', '§', '¶');
$this->text = str_replace($search, $replace, $newDom->saveHTML());
Special Character Codes for HTML: https://www.ou.edu/research/electron/internet/special.shtml
Hàm str_replace: Replace all occurrences of the search string with the replacement string
Fix HTML encoding errors with PHP DOMDocument: https://gist.github.com/xeoncross/9401853