we need to double encode (html::htmlspecialchars( , TRUE)), as otherwise we get invalid json, eg. for quotes, fixes not working display in filemanager for some directories containing directories with quotes in their name

This commit is contained in:
Ralf Becker 2013-08-01 06:36:18 +00:00
parent a7180f2f1c
commit 8ce9969ece

View File

@ -826,7 +826,8 @@ abstract class egw_framework
foreach($extra as $name => $value)
{
if (is_array($value)) $value = json_encode($value);
$java_script .= ' data-'.$name."=\"". html::htmlspecialchars($value)."\"";
// we need to double encode (html::htmlspecialchars( , TRUE)), as otherwise we get invalid json, eg. for quotes
$java_script .= ' data-'.$name."=\"". html::htmlspecialchars($value, true)."\"";
}
$java_script .= "></script>\n";