Hi, @Jan .
As you mention, customizing files under the lib/
folder is tricky. You can change the config/application.rb
file and add config.autoload_paths << Rails.root.join("lib/custom")
before the line saying config.autoload_paths << Rails.root.join("lib")
.
Then you can create a file in lib/custom/admin_wysiwyg_sanitizer.rb
with the following content:
require_dependency Rails.root.join("lib", "admin_wysiwyg_sanitizer").to_s
class AdminWYSIWYGSanitizer
alias_method :consul_allowed_tags, :allowed_tags
def allowed_tags
consul_allowed_tags + ["br"]
end
end
Having said that, the reason why the <br>
tag isn’t allowed by default is that, although it has some usages, like splitting the lines of a poem, it’s very rare to find these usages in the context of CONSUL.