escape html code before output

This commit is contained in:
Uwe Steinmann 2015-04-30 14:04:56 +02:00
parent 52a2106155
commit b0d8b42011

View File

@ -132,7 +132,7 @@ if(in_array($type, array('docspermonth'))) {
var data = [
<?php
foreach($data as $rec) {
echo '['.$rec['key'].','.$rec['total'].'],'."\n";
echo '['.htmlspecialchars($rec['key']).','.$rec['total'].'],'."\n";
}
?>
];
@ -169,7 +169,7 @@ if(in_array($type, array('docspermonth'))) {
var data = [
<?php
foreach($data as $rec) {
echo '{ label: "'.$rec['key'].'", data: [[1,'.$rec['total'].']]},'."\n";
echo '{ label: "'.htmlspecialchars($rec['key']).'", data: [[1,'.$rec['total'].']]},'."\n";
}
?>
];