From 134f3e6e09ed0583bc377a08ef46a51013635a2e Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 15 Feb 2017 18:05:02 -0500 Subject: Security: prevent XSS attach on wiki page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Miguel Ángel Jimeno. --- templates/repo/wiki/view.tmpl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'templates/repo/wiki') diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index 9a1a984b63..b9aa4e9560 100644 --- a/templates/repo/wiki/view.tmpl +++ b/templates/repo/wiki/view.tmpl @@ -1,6 +1,7 @@ {{template "base/head" .}}
{{template "repo/header" .}} + {{ $title := .title | Sanitize}}
@@ -9,7 +10,7 @@
{{.i18n.Tr "repo.wiki.page"}}: - {{.title}} + {{$title}}
@@ -20,7 +21,7 @@
@@ -50,8 +51,8 @@
-
- {{.title}} +
+ {{$title}} {{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
{{.i18n.Tr "repo.wiki.edit_page_button"}} @@ -95,7 +96,7 @@ {{.i18n.Tr "repo.wiki.delete_page_button"}}
-

{{.i18n.Tr "repo.wiki.delete_page_notice_1" .title | Safe}}

+

{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}

{{template "base/delete_modal_actions" .}}
-- cgit v1.2.3