Commit 9deda682 authored by Vinnie Okada's avatar Vinnie Okada

Parse GFM references after sanitizing

Parse GFM references - labels, issues, MRs, etc. - after calling the
HTML Pipeline `SanitizationFilter` so that we can use non-whitelisted
attributes like `style`.
parent 3d4c2d0b
...@@ -70,8 +70,6 @@ module Gitlab ...@@ -70,8 +70,6 @@ module Gitlab
# TODO: add popups with additional information # TODO: add popups with additional information
text = parse(text, project)
# Insert pre block extractions # Insert pre block extractions
text.gsub!(/\{gfm-extraction-(\h{32})\}/) do text.gsub!(/\{gfm-extraction-(\h{32})\}/) do
insert_piece($1) insert_piece($1)
...@@ -120,6 +118,8 @@ module Gitlab ...@@ -120,6 +118,8 @@ module Gitlab
text = result[:output].to_html(save_with: saveoptions) text = result[:output].to_html(save_with: saveoptions)
text = parse(text, project)
if options[:parse_tasks] if options[:parse_tasks]
text = parse_tasks(text) text = parse_tasks(text)
end end
...@@ -141,7 +141,7 @@ module Gitlab ...@@ -141,7 +141,7 @@ module Gitlab
@extractions[id] @extractions[id]
end end
# Private: Parses text for references and emoji # Private: Parses text for references
# #
# text - Text to parse # text - Text to parse
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment