gitlab-org--gitlab-foss/lib/banzai/renderer/html.rb
Robert Speicher 2e8aa209f0 Merge branch '30125-markdown-security'
Remove class from SanitizationFilter whitelist

See merge request !2079
2017-04-05 21:03:46 -07:00

13 lines
284 B
Ruby

module Banzai
module Renderer
class HTML < Redcarpet::Render::HTML
def block_code(code, lang)
lang_attr = lang ? %Q{ lang="#{lang}"} : ''
"\n<pre>" \
"<code#{lang_attr}>#{html_escape(code)}</code>" \
"</pre>"
end
end
end
end