changeset 10856:b07bd417115b

templates: escape javascript braces
author Matt Mackall <mpm@selenic.com>
date Mon, 05 Apr 2010 15:25:08 -0500
parents 62216faed067
children 30cce7010630
files mercurial/templates/gitweb/graph.tmpl mercurial/templates/monoblue/graph.tmpl mercurial/templates/paper/graph.tmpl mercurial/templates/spartan/graph.tmpl
diffstat 4 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- 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 += '</span> _TAGS';
 revlink += '<span class="info">_DATE, by _USER</span></li>';
 
-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 = '<span class="logtags">';
-		if (cur[6][1]) {
+		if (cur[6][1]) \{
 			tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
 			tagspan += cur[6][0] + '</span> ';
-		} else if (!cur[6][1] && cur[6][0] != 'default') {
+		} else if (!cur[6][1] && cur[6][0] != 'default') \{
 			tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
 			tagspan += cur[6][0] + '</span> ';
 		}
-		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 += '<span class="tagtag">' + tag + '</span> ';
 			}
--- 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 += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
     revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
 
-    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 = '<span class="logtags">';
-            if (cur[6][1]) {
+            if (cur[6][1]) \{
                 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
                 tagspan += cur[6][0] + '</span> ';
-            } else if (!cur[6][1] && cur[6][0] != 'default') {
+            } else if (!cur[6][1] && cur[6][0] != 'default') \{
                 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
                 tagspan += cur[6][0] + '</span> ';
             }
-            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 += '<span class="tagtag">' + tag + '</span> ';
                 }
--- 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 += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
 
-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 = '<span class="logtags">';
-		if (cur[6][1]) {
+		if (cur[6][1]) \{
 			tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
 			tagspan += cur[6][0] + '</span> ';
-		} else if (!cur[6][1] && cur[6][0] != 'default') {
+		} else if (!cur[6][1] && cur[6][0] != 'default') \{
 			tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
 			tagspan += cur[6][0] + '</span> ';
 		}
-		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 += '<span class="tag">' + tag + '</span> ';
 			}
--- 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 += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
 revlink += '</span><span class="info">_DATE, by _USER</span></li>';
 
-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);