# HG changeset patch # User Matt Mackall # Date 2010-04-05 20:25:08 # Node ID b07bd417115baa52f7dde8112350352735bb6143 # Parent 62216faed0672cc39d9efd7cea9c0ad714934f0e templates: escape javascript braces diff --git a/mercurial/templates/gitweb/graph.tmpl b/mercurial/templates/gitweb/graph.tmpl --- a/mercurial/templates/gitweb/graph.tmpl +++ b/mercurial/templates/gitweb/graph.tmpl @@ -50,7 +50,7 @@ var data = {jsdata|json}; 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 += '_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 @@ graph.vertex = function(x, y, color, par 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 --git a/mercurial/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl --- a/mercurial/templates/monoblue/graph.tmpl +++ b/mercurial/templates/monoblue/graph.tmpl @@ -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 --git a/mercurial/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl --- a/mercurial/templates/paper/graph.tmpl +++ b/mercurial/templates/paper/graph.tmpl @@ -59,7 +59,7 @@ var data = {jsdata|json}; 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 @@ var revlink = '
  • '; 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 --git a/mercurial/templates/spartan/graph.tmpl b/mercurial/templates/spartan/graph.tmpl --- a/mercurial/templates/spartan/graph.tmpl +++ b/mercurial/templates/spartan/graph.tmpl @@ -43,7 +43,7 @@ var data = {jsdata|json}; 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 @@ var revlink = '