diff --git a/app/lib/advanced_text_formatter.rb b/app/lib/advanced_text_formatter.rb index 728400819..dcaf34b91 100644 --- a/app/lib/advanced_text_formatter.rb +++ b/app/lib/advanced_text_formatter.rb @@ -8,7 +8,7 @@ class AdvancedTextFormatter < TextFormatter end def block_code(code, _language) - <<~HTML.squish + <<~HTML
#{ERB::Util.h(code).gsub("\n", '
')}
HTML end