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) {
|
function parseData(key, value) {
|
||||||
var ret = {
|
var ret = {
|
||||||
id: Ox.uid().toString(),
|
id: Ox.uid().toString(),
|
||||||
title: key.toString() + ': '
|
title: Ox.encodeHTMLEntities(key.toString()) + ': '
|
||||||
},
|
},
|
||||||
type = Ox.typeOf(value);
|
type = Ox.typeOf(value);
|
||||||
if (type == 'array' || type == 'object') {
|
if (type == 'array' || type == 'object') {
|
||||||
|
@ -202,8 +202,8 @@ Ox.TreeList = function(options, self) {
|
||||||
ret.title += (
|
ret.title += (
|
||||||
type == 'function'
|
type == 'function'
|
||||||
? value.toString().split('{')[0]
|
? value.toString().split('{')[0]
|
||||||
: JSON.stringify(value)
|
: Ox.encodeHTMLEntities(JSON.stringify(value))
|
||||||
.replace(/(^"|"$)/g, '<span class="OxLight">"</span>')
|
.replace(/(^"|"$)/g, '<span class="OxLight">"</span>')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue