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:
Diffstat (limited to 'lib/banzai/filter/table_of_contents_filter.rb')
-rw-r--r--lib/banzai/filter/table_of_contents_filter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/banzai/filter/table_of_contents_filter.rb b/lib/banzai/filter/table_of_contents_filter.rb
index 179afd840a5..1c794a81d9d 100644
--- a/lib/banzai/filter/table_of_contents_filter.rb
+++ b/lib/banzai/filter/table_of_contents_filter.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require 'cgi/util'
+
# Generated HTML is transformed back to GFM by app/assets/javascripts/behaviors/markdown/nodes/table_of_contents.js
module Banzai
module Filter
@@ -93,7 +95,7 @@ module Banzai
def text
return '' unless node
- @text ||= EscapeUtils.escape_html(node.text)
+ @text ||= CGI.escapeHTML(node.text)
end
private