# HG changeset patch # User Matt Mackall # Date 1270499108 18000 # Node ID b07bd417115baa52f7dde8112350352735bb6143 # Parent 62216faed0672cc39d9efd7cea9c0ad714934f0e templates: escape javascript braces diff -r 62216faed067 -r b07bd417115b mercurial/templates/gitweb/graph.tmpl --- a/mercurial/templates/gitweb/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 +++ b/mercurial/templates/gitweb/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 @@ -50,7 +50,7 @@ var graph = new Graph(); graph.scale({bg_height}); -graph.edge = function(x0, y0, x1, y1, color) { +graph.edge = function(x0, y0, x1, y1, color) \{ this.setColor(color, 0.0, 0.65); this.ctx.beginPath(); @@ -65,7 +65,7 @@ revlink += ' _TAGS'; revlink += '_DATE, by _USER'; -graph.vertex = function(x, y, color, parity, cur) { +graph.vertex = function(x, y, color, parity, cur) \{ this.ctx.beginPath(); color = this.setColor(color, 0.25, 0.75); @@ -84,17 +84,17 @@ item = item.replace(/_DATE/, cur[5]); var tagspan = ''; - if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { + if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{ tagspan = ''; - if (cur[6][1]) { + if (cur[6][1]) \{ tagspan += ''; tagspan += cur[6][0] + ' '; - } else if (!cur[6][1] && cur[6][0] != 'default') { + } else if (!cur[6][1] && cur[6][0] != 'default') \{ tagspan += ''; tagspan += cur[6][0] + ' '; } - if (cur[7].length) { - for (var t in cur[7]) { + if (cur[7].length) \{ + for (var t in cur[7]) \{ var tag = cur[7][t]; tagspan += '' + tag + ' '; } diff -r 62216faed067 -r b07bd417115b mercurial/templates/monoblue/graph.tmpl --- a/mercurial/templates/monoblue/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 +++ b/mercurial/templates/monoblue/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 @@ -48,7 +48,7 @@ var graph = new Graph(); graph.scale({bg_height}); - graph.edge = function(x0, y0, x1, y1, color) { + graph.edge = function(x0, y0, x1, y1, color) \{ this.setColor(color, 0.0, 0.65); this.ctx.beginPath(); @@ -62,7 +62,7 @@ revlink += '_DESC'; revlink += '_TAGS_DATE, by _USER'; - graph.vertex = function(x, y, color, parity, cur) { + graph.vertex = function(x, y, color, parity, cur) \{ this.ctx.beginPath(); color = this.setColor(color, 0.25, 0.75); @@ -81,17 +81,17 @@ item = item.replace(/_DATE/, cur[5]); var tagspan = ''; - if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { + if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{ tagspan = ''; - if (cur[6][1]) { + if (cur[6][1]) \{ tagspan += ''; tagspan += cur[6][0] + ' '; - } else if (!cur[6][1] && cur[6][0] != 'default') { + } else if (!cur[6][1] && cur[6][0] != 'default') \{ tagspan += ''; tagspan += cur[6][0] + ' '; } - if (cur[7].length) { - for (var t in cur[7]) { + if (cur[7].length) \{ + for (var t in cur[7]) \{ var tag = cur[7][t]; tagspan += '' + tag + ' '; } diff -r 62216faed067 -r b07bd417115b mercurial/templates/paper/graph.tmpl --- a/mercurial/templates/paper/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 +++ b/mercurial/templates/paper/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 @@ -59,7 +59,7 @@ var graph = new Graph(); graph.scale({bg_height}); -graph.edge = function(x0, y0, x1, y1, color) { +graph.edge = function(x0, y0, x1, y1, color) \{ this.setColor(color, 0.0, 0.65); this.ctx.beginPath(); @@ -73,7 +73,7 @@ revlink += '_DESC'; revlink += '_TAGS_DATE, by _USER'; -graph.vertex = function(x, y, color, parity, cur) { +graph.vertex = function(x, y, color, parity, cur) \{ this.ctx.beginPath(); color = this.setColor(color, 0.25, 0.75); @@ -92,17 +92,17 @@ item = item.replace(/_DATE/, cur[5]); var tagspan = ''; - if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { + if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{ tagspan = ''; - if (cur[6][1]) { + if (cur[6][1]) \{ tagspan += ''; tagspan += cur[6][0] + ' '; - } else if (!cur[6][1] && cur[6][0] != 'default') { + } else if (!cur[6][1] && cur[6][0] != 'default') \{ tagspan += ''; tagspan += cur[6][0] + ' '; } - if (cur[7].length) { - for (var t in cur[7]) { + if (cur[7].length) \{ + for (var t in cur[7]) \{ var tag = cur[7][t]; tagspan += '' + tag + ' '; } diff -r 62216faed067 -r b07bd417115b mercurial/templates/spartan/graph.tmpl --- a/mercurial/templates/spartan/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 +++ b/mercurial/templates/spartan/graph.tmpl Mon Apr 05 15:25:08 2010 -0500 @@ -43,7 +43,7 @@ var graph = new Graph(); graph.scale({bg_height}); -graph.edge = function(x0, y0, x1, y1, color) { +graph.edge = function(x0, y0, x1, y1, color) \{ this.setColor(color, 0.0, 0.65); this.ctx.beginPath(); @@ -57,7 +57,7 @@ revlink += '_DESC'; revlink += '_DATE, by _USER'; -graph.vertex = function(x, y, color, parity, cur) { +graph.vertex = function(x, y, color, parity, cur) \{ this.ctx.beginPath(); color = this.setColor(color, 0.25, 0.75);