Skip to content
Snippets Groups Projects
Commit 9843c8e8 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Merge pull request #4434 from owncloud/fix_octemplate_escaping

Fix octemplate string escaping.
parents 3e7ddbc9 776d64f8
Branches
No related tags found
No related merge requests found
......@@ -60,9 +60,10 @@
var self = this;
if(typeof this.options.escapeFunction === 'function') {
for (var key = 0; key < this.vars.length; key++) {
if(typeof this.vars[key] === 'string') {
this.vars[key] = self.options.escapeFunction(this.vars[key]);
var keys = Object.keys(this.vars);
for (var key = 0; key < keys.length; key++) {
if(typeof this.vars[keys[key]] === 'string') {
this.vars[keys[key]] = self.options.escapeFunction(this.vars[keys[key]]);
}
}
}
......@@ -85,7 +86,7 @@
}
},
options: {
escapeFunction: function(str) {return $('<i></i>').text(str).html();}
escapeFunction: escapeHTML
}
};
......
......@@ -257,8 +257,8 @@ class OC {
OC_Util::addScript("compatibility");
OC_Util::addScript("jquery.ocdialog");
OC_Util::addScript("oc-dialogs");
OC_Util::addScript("octemplate");
OC_Util::addScript("js");
OC_Util::addScript("octemplate");
OC_Util::addScript("eventsource");
OC_Util::addScript("config");
//OC_Util::addScript( "multiselect" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment