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#