diff --git a/mercurial/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl
--- a/mercurial/templates/paper/branches.tmpl
+++ b/mercurial/templates/paper/branches.tmpl
@@ -47,7 +47,9 @@ files, or words in the commit messagebranch
node |
+
{entries % branchentry}
+
diff --git a/mercurial/templates/paper/map b/mercurial/templates/paper/map
--- a/mercurial/templates/paper/map
+++ b/mercurial/templates/paper/map
@@ -179,7 +179,7 @@ bookmarkentry = '
'
branches = branches.tmpl
branchentry = '
-
+
{branch|escape}
|