]> git.proxmox.com Git - pve-docs.git/blobdiff - api-viewer/PVEAPI.js
iapi-viewer: correctly encode type text
[pve-docs.git] / api-viewer / PVEAPI.js
index ff3cd447fde239547a2a3eb8368e0df8db937783..75168e6ea03a37da3db8de9066176ac43dfa507d 100644 (file)
@@ -62,7 +62,7 @@ Ext.onReady(function() {
        metaData.style = 'white-space:normal;'
 
        if (pdef.typetext)
-           return pdef.typetext;
+           return Ext.htmlEncode(pdef.typetext);
 
        if (pdef['enum'])
            return pdef['enum'].join(' | ');
@@ -71,7 +71,7 @@ Ext.onReady(function() {
            return pdef.format;
 
        if (pdef.pattern) 
-           return pdef.pattern;
+           return Ext.htmlEncode(pdef.pattern);
 
        return '';
     };
@@ -137,7 +137,7 @@ Ext.onReady(function() {
 
                    var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
                        enableGroupingMenu: false,
-                       groupHeaderTpl: '<tpl if="name">Optional</tpl><tpl if="!name">Required</tpl>'
+                       groupHeaderTpl: '<tpl if="groupValue">Optional</tpl><tpl if="!groupValue">Required</tpl>'
                    });
 
                    sections.push({
@@ -239,6 +239,7 @@ Ext.onReady(function() {
        ct.setTitle("Path: " + data.path);
        ct.removeAll(true);
        ct.add(items);
+       ct.setActiveTab(0);
     };
 
     var tree = Ext.create('Ext.tree.Panel', {