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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-17 09:10:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-17 09:10:33 +0300
commit7118851f0272b099335a34d8ca18a045aa5de51d (patch)
tree4ef50130a82a7b544936b9a298eb2c0e4968ec2e /lib
parentb24742b7ed7add26a843d31207113610774fed4c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-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