Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-06-15 08:40:14 +0300
committerMark Chao <mchao@gitlab.com>2018-06-16 06:23:35 +0300
commit00c68e1b03ed92eef6aa6ab3fb84b827b14b9daa (patch)
tree2a777aee17f24709f07ea853b46d03918b542cb6 /lib/banzai
parentfb08183e63733dd7845a16d9f827a5cd5f2d9080 (diff)
Fix xss for Markdown elements where [[_TOC_]] is enabled
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/filter/table_of_contents_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/table_of_contents_filter.rb b/lib/banzai/filter/table_of_contents_filter.rb
index 97244159985..b32660a8341 100644
--- a/lib/banzai/filter/table_of_contents_filter.rb
+++ b/lib/banzai/filter/table_of_contents_filter.rb
@@ -92,7 +92,7 @@ module Banzai
def text
return '' unless node
- @text ||= node.text
+ @text ||= EscapeUtils.escape_html(node.text)
end
private