Skip to content
Snippets Groups Projects
Unverified Commit e5165264 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Fix #2462 (#2475)

parent 97e62908
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ class Static::Html < Static::Default
@prepared = sanitize @prepared
@prepared = remove_line_breaks @prepared
@prepared = clean_code @prepared
@prepared = remove_useless_br @prepared
# clean_empty_paragraphs_at_beginning_and_end re-sends \n, because of Nokogiri.
# Can be changed with a weird hack (Nokogiri(format: 0)) but a gsub is easiest (PAB)
@prepared = remove_line_breaks @prepared
......@@ -56,4 +57,10 @@ class Static::Html < Static::Default
end
end
# Suppression des <br></p>
# https://github.com/osunyorg/admin/issues/2462
def remove_useless_br(html)
html.gsub('<br></p>', '</p>')
end
end
\ No newline at end of file
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