diff --git a/server/src/main/webapp/resources/admin/manage_clients.html b/server/src/main/webapp/resources/admin/manage_clients.html index 7773a1b06..1a255cda6 100644 --- a/server/src/main/webapp/resources/admin/manage_clients.html +++ b/server/src/main/webapp/resources/admin/manage_clients.html @@ -65,26 +65,26 @@ <script type="text/html" id="client_tmpl"> <tr> - <td><%=name%></td> - <td><%=redirectURL%></td> + <td><#=name#></td> + <td><#=redirectURL#></td> <td> <ul> - <% for (var i in grantType) { %> - <li><%=grantType[i]%></li> - <% } %> + <# for (var i in grantType) { #> + <li><#=grantType[i]#></li> + <# } #> </ul> </td> <td> <ul> - <% for (var i in scope) { %> - <li><%=scope[i]%></li> - <% } %> + <# for (var i in scope) { #> + <li><#=scope[i]#></li> + <# } #> </ul> </td> - <td><%=authority%></td> - <td><%=description%> + <td><#=authority#></td> + <td><#=description#> </td> - <td><input type="checkbox" "<%=(refreshTokens == 1 ? 'checked' : '')%> value="" id="" name="" disabled></td> + <td><input type="checkbox" "<#=(refreshTokens == 1 ? 'checked' : '')#> value="" id="" name="" disabled></td> <td> <button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn">edit diff --git a/server/src/main/webapp/resources/js/tmpl.js b/server/src/main/webapp/resources/js/tmpl.js index 96864cf5f..e72802f98 100644 --- a/server/src/main/webapp/resources/js/tmpl.js +++ b/server/src/main/webapp/resources/js/tmpl.js @@ -1,9 +1,12 @@ +// A slightly modified version of the Resig Templating library +// JSP hates the original + // Simple JavaScript Templating // John Resig - http://ejohn.org/ - MIT Licensed -(function() { +(function(){ var cache = {}; - this.tmpl = function tmpl(str, data) { + this.tmpl = function tmpl(str, data){ // Figure out if we're getting a template, or if we need to // load the template - and be sure to cache the result. var fn = !/\W/.test(str) ? @@ -19,16 +22,18 @@ "with(obj){p.push('" + // Convert the template into pure JavaScript - str.replace(/[\r\t\n]/g, " ") - .replace(/'(?=[^%]*%>)/g,"\t") + str + .replace(/[\r\t\n]/g, " ") + .replace(/'(?=[^#]*#>)/g, "\t") .split("'").join("\\'") .split("\t").join("'") - .replace(/<%=(.+?)%>/g, "',$1,'") - .split("<%").join("');") - .split("%>").join("p.push('") + .replace(/<#=(.+?)#>/g, "',$1,'") + .split("<#").join("');") + .split("#>").join("p.push('") + .split("\r").join("\\'") + "');}return p.join('');"); // Provide some basic currying to the user - return data ? fn(data) : fn; + return data ? fn( data ) : fn; }; })(); \ No newline at end of file