How about something like this?
diff -r 6ce2da9aa1c7 hgext/interhg.py
--- a/hgext/interhg.py Sun Aug 26 01:04:15 2007 +0900
+++ b/hgext/interhg.py Sun Aug 26 01:12:07 2007 +0900
@@ -27,19 +27,19 @@ from mercurial.hgweb import hgweb_mod
from mercurial.hgweb import hgweb_mod
from mercurial import templater
-orig_escape = templater.common_filters["escape"]
+orig_decorate = templater.common_filters["decorate"]
interhg_table = []
-def interhg_escape(x):
- escstr = orig_escape(x)
+def interhg_decorate(x):
+ escstr = orig_decorate(x)
for pat in interhg_table:
regexp = pat[0]
format = pat[1]
escstr = regexp.sub(format, escstr)
return escstr
-templater.common_filters["escape"] = interhg_escape
+templater.common_filters["decorate"] = interhg_decorate
orig_refresh = hgweb_mod.hgweb.refresh
diff -r 6ce2da9aa1c7 mercurial/templater.py
--- a/mercurial/templater.py Sun Aug 26 01:04:15 2007 +0900
+++ b/mercurial/templater.py Sun Aug 26 01:12:07 2007 +0900
@@ -260,6 +260,7 @@ common_filters = {
"domain": domain,
"email": email,
"escape": lambda x: cgi.escape(x, True),
+ "decorate": lambda x: x,
"fill68": lambda x: fill(x, width=68),
"fill76": lambda x: fill(x, width=76),
"firstline": firstline,
diff -r 6ce2da9aa1c7 templates/changelogentry.tmpl
--- a/templates/changelogentry.tmpl Sun Aug 26 01:04:15 2007 +0900
+++ b/templates/changelogentry.tmpl Sun Aug 26 01:12:07 2007 +0900
@@ -1,7 +1,7 @@
<table class="logEntry parity#parity#">
<tr>
<th class="age">#date|age# ago:</th>
- <th class="firstline">#desc|strip|firstline|escape#</th>
+ <th class="firstline">#desc|strip|firstline|escape|decorate#</th>
</tr>
<tr>
<th class="revision">changeset #rev#:</th>
diff -r 6ce2da9aa1c7 templates/changeset.tmpl
--- a/templates/changeset.tmpl Sun Aug 26 01:04:15 2007 +0900
+++ b/templates/changeset.tmpl Sun Aug 26 01:12:07 2007 +0900
@@ -34,7 +34,7 @@
<td class="files">#files#</td></tr>
<tr>
<th class="description">description:</th>
- <td class="description">#desc|strip|escape|addbreaks#</td>
+ <td class="description">#desc|strip|escape|decorate|addbreaks#</td>
</tr>
</table>
|