[pve-devel] applied: [PATCH 2/2] api-viewer: properly HTML encode properties
Thomas Lamprecht
t.lamprecht at proxmox.com
Sat Aug 17 12:57:22 CEST 2019
and fix missing closing </pre> tag
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
api-viewer/PMGAPI.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/api-viewer/PMGAPI.js b/api-viewer/PMGAPI.js
index e4504af..6488e3e 100644
--- a/api-viewer/PMGAPI.js
+++ b/api-viewer/PMGAPI.js
@@ -198,12 +198,12 @@ Ext.onReady(function() {
var returnhtml;
if (retinf.items) {
- returnhtml = '<pre>items: ' + JSON.stringify(retinf.items, null, 4) + '</pre>';
+ returnhtml = '<pre>items: ' + Ext.htmlEncode(JSON.stringify(retinf.items, null, 4)) + '</pre>';
}
if (retinf.properties) {
returnhtml = returnhtml || '';
- returnhtml += '<pre>properties:' + JSON.stringify(retinf.properties, null, 4);
+ returnhtml += '<pre>properties:' + Ext.htmlEncode(JSON.stringify(retinf.properties, null, 4)) + '</pre>';
}
sections.push({
--
2.20.1
More information about the pve-devel
mailing list