diff --git a/app/services/html_sanitizer.rb b/app/services/html_sanitizer.rb
index 4f2e44e0ab..df3c608219 100644
--- a/app/services/html_sanitizer.rb
+++ b/app/services/html_sanitizer.rb
@@ -9,7 +9,7 @@ class HtmlSanitizer
def self.sanitize(html)
@sanitizer ||= Rails::HTML5::SafeListSanitizer.new
@sanitizer.sanitize(
- html, tags: %w[h1 h2 h3 h4 p b i u a], attributes: %w[href target],
+ html, tags: %w[h1 h2 h3 h4 p br b i u a], attributes: %w[href target],
)
end
end
diff --git a/spec/services/html_sanitizer_spec.rb b/spec/services/html_sanitizer_spec.rb
index 7f238ab733..c98d695b35 100644
--- a/spec/services/html_sanitizer_spec.rb
+++ b/spec/services/html_sanitizer_spec.rb
@@ -12,9 +12,9 @@ RSpec.describe HtmlSanitizer do
end
it "keeps supported tags" do
- html = "Hello alert!"
+ html = "Hello alert!
How are you?"
expect(subject.sanitize(html))
- .to eq "Hello alert!"
+ .to eq "Hello alert!
How are you?"
end
it "keeps supported attributes" do