Escape '&'.

This commit is contained in:
Simon MacMullen 2012-01-23 15:34:25 +00:00
parent 4468c92a45
commit fd4ad166dc
1 changed files with 2 additions and 1 deletions

View File

@ -309,7 +309,8 @@ function fmt_idle_long(obj) {
}
function fmt_escape_html(txt) {
return txt.replace(/</g, '&lt;')
return txt.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\n/g, '<br/>')
.replace(/\"/g, '&quot;');