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:
authorDouwe Maan <douwe@gitlab.com>2018-03-28 17:03:22 +0300
committerDouwe Maan <douwe@gitlab.com>2018-03-28 17:03:22 +0300
commitd7a9df68329bee42a4f2c4934351022c949f7c71 (patch)
treebda5012b23e698083fc6f8656307f1e5b93f7a65 /lib
parente0a8447e06bbeb1c42598ed360fcb6ec0f7bb678 (diff)
parent3a43cf426af6433ec8d5597da902f1081866796d (diff)
Merge branch '44649-reference-parsing-conflicting-with-auto-linking' into 'master'
Resolve "Reference parsing conflicting with auto-linking" Closes #44649 See merge request gitlab-org/gitlab-ce!18045
Diffstat (limited to 'lib')
-rw-r--r--lib/banzai/filter/autolink_filter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/banzai/filter/autolink_filter.rb b/lib/banzai/filter/autolink_filter.rb
index ce401c1c31c..4a143baeef6 100644
--- a/lib/banzai/filter/autolink_filter.rb
+++ b/lib/banzai/filter/autolink_filter.rb
@@ -105,8 +105,12 @@ module Banzai
end
end
- options = link_options.merge(href: match)
- content_tag(:a, match.html_safe, options) + dropped
+ # match has come from node.to_html above, so we know it's encoded
+ # correctly.
+ html_safe_match = match.html_safe
+ options = link_options.merge(href: html_safe_match)
+
+ content_tag(:a, html_safe_match, options) + dropped
end
def autolink_filter(text)