* when show the diff, use specialchars.

This commit is contained in:
wangchunsheng
2010-09-12 03:53:01 +00:00
parent 2c4cdcd414
commit 6c9383b5d8
+5 -1
View File
@@ -225,7 +225,11 @@ class actionModel extends model
$history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space);
if($history->diff != '')
{
printf($this->lang->action->desc->diff2, $history->fieldLabel, nl2br($history->diff));
$history->diff = str_replace(array('<ins>', '</ins>', '<del>', '</del>'), array('[ins]', '[/ins]', '[del]', '[/del]'), $history->diff);
$history->diff = htmlspecialchars($history->diff);
$history->diff = str_replace(array('[ins]', '[/ins]', '[del]', '[/del]'), array('<ins>', '</ins>', '<del>', '</del>'), $history->diff);
$history->diff = nl2br($history->diff);
printf($this->lang->action->desc->diff2, $history->fieldLabel, $history->diff);
}
else
{