From 4b0b11e3d4d9c17ad325599099123ac20293df56 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 7 Aug 2013 10:27:10 +0000 Subject: [PATCH] tree list: encode html entities --- source/Ox.UI/js/List/TreeList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/List/TreeList.js b/source/Ox.UI/js/List/TreeList.js index bd16c6e2..ec80ec32 100644 --- a/source/Ox.UI/js/List/TreeList.js +++ b/source/Ox.UI/js/List/TreeList.js @@ -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, '"') + : Ox.encodeHTMLEntities(JSON.stringify(value)) + .replace(/(^"|"$)/g, '"') ); } return ret;