Skip to content
Snippets Groups Projects
Commit 421edd35 authored by Robert Speicher's avatar Robert Speicher
Browse files

Escape normal text in our Redcarpet renderer

parent 588267b5
No related branches found
No related tags found
No related merge requests found
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
require 'active_support/core_ext/string/output_safety'
 
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
attr_reader :template
alias_method :h, :template
 
Loading
Loading
@@ -21,6 +22,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
def normal_text(text)
return text unless text.present?
 
text = ERB::Util.html_escape_once(text)
text.gsub("'", "&rsquo;")
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment