From 43e95b21daf1bbf5f5e4d2bac9edac8de067a5d2 Mon Sep 17 00:00:00 2001 From: Rael Date: Sat, 17 Oct 2015 15:06:14 -0300 Subject: Escape single quote on team icon (#264) --- scudcloud-1.0/leftpane-src.js | 2 +- scudcloud-1.0/resources/leftpane.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scudcloud-1.0/leftpane-src.js b/scudcloud-1.0/leftpane-src.js index 40856f0..5e735a6 100644 --- a/scudcloud-1.0/leftpane-src.js +++ b/scudcloud-1.0/leftpane-src.js @@ -9,7 +9,7 @@ var LeftPane = { li.setAttribute("title", name); li.innerHTML = name[0]; if( icon ){ - li.style.backgroundImage = "url('"+ icon +"')"; + li.style.backgroundImage = "url('"+ icon.replace(/'/g, '"') +"')"; li.innerHTML = ""; } ul.appendChild(li); diff --git a/scudcloud-1.0/resources/leftpane.js b/scudcloud-1.0/resources/leftpane.js index 1138579..005a43e 100644 --- a/scudcloud-1.0/resources/leftpane.js +++ b/scudcloud-1.0/resources/leftpane.js @@ -1 +1 @@ -var LeftPane={addTeam:function(e,t,n,l,i){var c=document.getElementById(e);if(null===c){var a=document.getElementById("teams");li=document.createElement("li"),li.id=e,li.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),li.setAttribute("title",t),li.innerHTML=t[0],l&&(li.style.backgroundImage="url('"+l+"')",li.innerHTML=""),a.appendChild(li),i&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){for(var t=document.getElementsByTagName("li"),n=0;n=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; +var LeftPane={addTeam:function(e,t,n,l,c){var i=document.getElementById(e);if(null===i){var a=document.getElementById("teams");li=document.createElement("li"),li.id=e,li.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),li.setAttribute("title",t),li.innerHTML=t[0],l&&(li.style.backgroundImage="url('"+l.replace(/'/g,""")+"')",li.innerHTML=""),a.appendChild(li),c&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){for(var t=document.getElementsByTagName("li"),n=0;n=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; -- cgit v1.1