diff mercurial/templates/atom/error.tmpl @ 18526:9409aeaafdc1 stable

hgweb: urlescape all urls, HTML escape repo/tag/branch/... names Without this, repository paths or names containing e.g. & characters or html tags yielded strange results, possibly allowing cross-site scripting attacks.
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 01 Feb 2013 20:43:35 +0100
parents f91e5630ce7e
children 4b0fc75f9403
line wrap: on
line diff
--- a/mercurial/templates/atom/error.tmpl	Fri Feb 01 15:14:05 2013 -0600
+++ b/mercurial/templates/atom/error.tmpl	Fri Feb 01 20:43:35 2013 +0100
@@ -1,8 +1,8 @@
 {header}
  <!-- Error -->
- <id>{urlbase}{url}</id>
- <link rel="self" href="{urlbase}{url}atom-log"/>
- <link rel="alternate" href="{urlbase}{url}"/>
+ <id>{urlbase}{url|urlescape}</id>
+ <link rel="self" href="{urlbase}{url|urlescape}atom-log"/>
+ <link rel="alternate" href="{urlbase}{url|urlescape}"/>
  <title>Error</title>
  <updated>1970-01-01T00:00:00+00:00</updated>
  <entry>