tree list: encode html entities
This commit is contained in:
parent
0d40620a68
commit
4b0b11e3d4
1 changed files with 3 additions and 3 deletions
|
@ -186,7 +186,7 @@ Ox.TreeList = function(options, self) {
|
|||
function parseData(key, value) {
|
||||
var ret = {
|
||||
id: Ox.uid().toString(),
|
||||
title: key.toString() + ': '
|
||||
title: Ox.encodeHTMLEntities(key.toString()) + ': '
|
||||
},
|
||||
type = Ox.typeOf(value);
|
||||
if (type == 'array' || type == 'object') {
|
||||
|
@ -202,8 +202,8 @@ Ox.TreeList = function(options, self) {
|
|||
ret.title += (
|
||||
type == 'function'
|
||||
? value.toString().split('{')[0]
|
||||
: JSON.stringify(value)
|
||||
.replace(/(^"|"$)/g, '<span class="OxLight">"</span>')
|
||||
: Ox.encodeHTMLEntities(JSON.stringify(value))
|
||||
.replace(/(^"|"$)/g, '<span class="OxLight">"</span>')
|
||||
);
|
||||
}
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue