diff --git a/templates/map b/templates/map
--- a/templates/map
+++ b/templates/map
@@ -3,16 +3,16 @@ header = header.tmpl
footer = footer.tmpl
search = search.tmpl
changelog = changelog.tmpl
-naventry = "#label# "
-filedifflink = "#file# "
-filenodelink = "#file# "
+naventry = "#label|escape# "
+filedifflink = "#file|escape# "
+filenodelink = "#file|escape# "
fileellipses = "..."
changelogentry = changelogentry.tmpl
searchentry = changelogentry.tmpl
changeset = changeset.tmpl
manifest = manifest.tmpl
-manifestdirentry = "
drwxr-xr-x | #basename#/"
-manifestfileentry = " |
#permissions|permissions# | #basename#"
+manifestdirentry = " |
drwxr-xr-x | #basename|escape#/"
+manifestfileentry = " |
#permissions|permissions# | #basename|escape#"
filerevision = filerevision.tmpl
fileannotate = fileannotate.tmpl
filediff = filediff.tmpl
@@ -26,23 +26,23 @@ difflineat = "#line
diffline = "#line|escape#"
changelogparent = "parent #rev#: | #node|short# | "
changesetparent = "parent #rev#: | #node|short# | "
-filerevparent = "parent: | #node|short# | "
-fileannotateparent = "parent: | #node|short# | "
+filerevparent = "parent: | #node|short# | "
+fileannotateparent = "parent: | #node|short# | "
changesetchild = "child #rev#: | #node|short# | "
changelogchild = "child #rev#: | #node|short# | "
-filerevchild = "child: | #node|short# | "
-fileannotatechild = "child: | #node|short# | "
+filerevchild = "child: | #node|short# | "
+fileannotatechild = "child: | #node|short# | "
tags = tags.tmpl
-tagentry = "#node# #tag#"
+tagentry = "#node# #tag|escape#"
diffblock = "#lines# "
-changelogtag = "tag: | #tag# | "
-changesettag = "tag: | #tag# | "
+changelogtag = "tag: | #tag|escape# | "
+changesettag = "tag: | #tag|escape# | "
filediffparent = "parent #rev#: | #node|short# | "
-filelogparent = "parent #rev#: | #node|short# | "
+filelogparent = "parent #rev#: | #node|short# | "
filediffchild = "child #rev#: | #node|short# | "
-filelogchild = "child #rev#: | #node|short# | "
-indexentry = "#name# | #shortdesc# | #contact|obfuscate# | #lastupdate|age# ago | RSS | "
+filelogchild = "child #rev#: | #node|short# | "
+indexentry = "#name|escape# | #shortdesc|escape# | #contact|obfuscate# | #lastupdate|age# ago | RSS | "
index = index.tmpl
-archiveentry = "#type# "
+archiveentry = "#type|escape# "
notfound = notfound.tmpl
error = error.tmpl
|