# HG changeset patch # User TK Soh # Date 1130277434 25200 # Node ID 56281e086f386f2ea812df5aa7ac13ead65e041c # Parent f84ed9c6131da1db6ec41ef508a9a817f53cd59e hgweb: add strip and rstrip filters to handle summary diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -164,6 +164,8 @@ class templater: common_filters = { "escape": cgi.escape, + "strip": lambda x: x.strip(), + "rstrip": lambda x: x.rstrip(), "age": age, "date": lambda x: util.datestr(x), "addbreaks": nl2br, diff --git a/templates/changelogentry-rss.tmpl b/templates/changelogentry-rss.tmpl --- a/templates/changelogentry-rss.tmpl +++ b/templates/changelogentry-rss.tmpl @@ -1,7 +1,7 @@ - #desc|firstline|escape# + #desc|strip|firstline|rstrip|escape# #url#?cs=#node|short# - + #author|obfuscate# #date|rfc822date# diff --git a/templates/changelogentry.tmpl b/templates/changelogentry.tmpl --- a/templates/changelogentry.tmpl +++ b/templates/changelogentry.tmpl @@ -1,7 +1,7 @@ - + diff --git a/templates/changeset.tmpl b/templates/changeset.tmpl --- a/templates/changeset.tmpl +++ b/templates/changeset.tmpl @@ -11,7 +11,7 @@ #archives%archiveentry# -

changeset: #desc|escape|firstline#

+

changeset: #desc|strip|escape|firstline#

#date|age# ago:#desc|firstline|escape##desc|strip|firstline|escape#
changeset #rev#:
@@ -32,7 +32,7 @@ - +
#files#
description:#desc|escape|addbreaks##desc|strip|escape|addbreaks#
diff --git a/templates/filelogentry-rss.tmpl b/templates/filelogentry-rss.tmpl --- a/templates/filelogentry-rss.tmpl +++ b/templates/filelogentry-rss.tmpl @@ -1,7 +1,7 @@ - #desc|firstline|escape# + #desc|strip|firstline|rstrip|escape# #url#?f=#filenode|short#;file=#file# - + #author|obfuscate# #date|rfc822date#> diff --git a/templates/filelogentry.tmpl b/templates/filelogentry.tmpl --- a/templates/filelogentry.tmpl +++ b/templates/filelogentry.tmpl @@ -1,7 +1,7 @@ - +
#date|age# ago: #desc|firstline|escape#
#desc|strip|firstline|escape#
revision #filerev#:  #filenode|short#