Hello,
A new issue has been created and assigned
to you:
806 - /Pluf/Template.php
Project: Pluf Framework
Status: New
Reported by: Jürgen Hörmann
Labels:
Priority:Medium
Type:Defect
Description:
Hello.
There is a problem with the htmspecialchars() call on line 232 of pluf/src/Pluf/Template.php
If the input string in $mixed contains German Umlauts or other non-ASCII chars that are NOT encoded in UTF, the call of htmlspecialchars will fail with this error:
htmlspecialchars(): Invalid multibyte sequence in argument
you have to validate the input before putting it into this function:
Replace in lines 232 and 236
htmlspecialchars($mixed, ENT_COMPAT, 'UTF-8')
with
htmlspecialchars(
((!mb_detect_encoding($mixed, 'UTF-8', true) )
? iconv(mb_detect_encoding($mixed, "auto", true), "UTF-8", $mixed)
: $mixed)
, ENT_COMPAT, 'UTF-8')
This works for me.
--
Issue:
http://projects.ceondo.com/p/pluf/issues/806/