Minor fix to inlined javascript - un-escaped '/' is not allowed
authorOlivier Le Floch <olivier.le-floch@polytechnique.org>
Tue, 27 May 2008 15:57:30 +0000 (17:57 +0200)
committerOlivier Le Floch <olivier.le-floch@polytechnique.org>
Tue, 27 May 2008 15:57:30 +0000 (17:57 +0200)
By the way Vincent, I think that that is a good argument in favor of external javascript files instead of inlined ones (as are enabling compression, caching, etc.)

templates/search/adv.form.tpl

index 5461b49..f2648e8 100644 (file)
     return function(row) {
         regexp = new RegExp('(' + RegExp.escape(block.value) + ')', 'i');
         
-        name = row[0].replace(regexp, '<strong>$1</strong>');
+        name = row[0].replace(regexp, '<strong>$1<\/strong>');
         
         if (row[1] == 1) {
           return name;
         }
         
-        return name + '<em>&nbsp;&nbsp;-&nbsp;&nbsp;'+ row[1] + ' camarades</em>';
+        return name + '<em>&nbsp;&nbsp;-&nbsp;&nbsp;' + row[1] + ' camarades<\/em>';
       };
   }