app/services/importers/cleaner.rb
Method clean_html
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.clean_html(html)
# invalid byte sequence in UTF-8
# https://stackoverflow.com/questions/32826781/invalid-byte-sequence-in-utf-8-when-sanitizing-wordpress-export-content
html = html.force_encoding('UTF-8').scrub
# Relaxed config : https://github.com/rgrove/sanitize/blob/main/lib/sanitize/config/relaxed.rb