rainphp/raintpl3 — Issue #10: htmlspecialchars should specify a charset
Author: bohwaz
Created: 2012-01-22 19:46:09+00:00
State: open

Actually in RainTPL3, htmlspecialchars is called like this:

$html = "htmlspecialchars( $html )";

But by default htmlspecialchars uses the ISO-8859-1 charset. And personnally I prefer to use UTF-8, so you should add a config option so that we can choose the charset (and make it default to UTF-8?), like this:

protected static $charset = 'UTF-8';
(...)
$html = 'htmlspecialchars('.$html.', ENT_COMPAT, \''.self::$charset.'\', false)';