Mercurial > hg
diff mercurial/templates/atom/branches.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 | add2f9ddcfb5 |
children | dd2cf90a3731 |
line wrap: on
line diff
--- a/mercurial/templates/atom/branches.tmpl Fri Feb 01 15:14:05 2013 -0600 +++ b/mercurial/templates/atom/branches.tmpl Fri Feb 01 20:43:35 2013 +0100 @@ -1,7 +1,7 @@ {header} - <id>{urlbase}{url}</id> - <link rel="self" href="{urlbase}{url}atom-tags"/> - <link rel="alternate" href="{urlbase}{url}tags"/> + <id>{urlbase}{url|urlescape}</id> + <link rel="self" href="{urlbase}{url|urlescape}atom-tags"/> + <link rel="alternate" href="{urlbase}{url|urlescape}tags"/> <title>{repo|escape}: branches</title> <summary>{repo|escape} branch history</summary> <author><name>Mercurial SCM</name></author>