Mercurial > hg
diff mercurial/templates/gitweb/changelogentry.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 | fe9d36a6853e |
children | 52305554fd6e |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/changelogentry.tmpl Fri Feb 01 15:14:05 2013 -0600 +++ b/mercurial/templates/gitweb/changelogentry.tmpl Fri Feb 01 20:43:35 2013 +0100 @@ -1,9 +1,9 @@ <div> -<a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}"><span class="age">{date|rfc822date}</span>{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></a> +<a class="title" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"><span class="age">{date|rfc822date}</span>{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></a> </div> <div class="title_text"> <div class="log_link"> -<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/> +<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/> </div> <i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/> </div>