Closed tanakahisateru closed 12 years ago
This issue seems closed.
ENT_NOQUOTES may be better choice just for only CDATA node.
Well, my change had broken consistency...
When $value = '"quoted"'
currently:
<p><![[CDATA ${value} ]]></p> ===> <p>"quoted"</p>
<p>${value}</p> ===> <p>"quoted"</p>
but better behavior that I think more consistent is:
<p><![[CDATA ${value} ]]></p> ===> <p>"quoted"</p>
<p>${value}</p> ===> <p>"quoted"</p>
(Though <p>"quoted"</p>
is beautiful but it allowed in plain text node only, and to detect where the value would be used in is so difficult.)
I close this issue not to change more. If something to be fixed would be there, I will assign a new issue number to it.
PHP5.4 has changed its internal encoding to utf-8 from latin-1 compatible multibyte. Then we got a problem to use
htmlspecialchars
with traditional CJK encodings as internal encoding. Callinghtmlspecialchars
without 3rd argument would be failed and return empty (or broken) string if non utf-8 text had been passed to it.PHPTAL has
setEncoding()
but it was bit untrusted until PHP5.4. To avoidhtmlspecialchars
problem, now we should consider the encoding when callinghtmlspecialchars
ifsetEncoding()
alive.