fix a11y-8.9.1
no p tag when Champ text with no value
This commit is contained in:
parent
1f219de931
commit
447612abdf
3 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
module StringToHtmlHelper
|
||||
def string_to_html(str, wrapper_tag = 'p')
|
||||
return nil if str.blank?
|
||||
html_formatted = simple_format(str, {}, { wrapper_tag: wrapper_tag })
|
||||
with_links = Anchored::Linker.auto_link(html_formatted, target: '_blank', rel: 'noopener')
|
||||
sanitize(with_links, attributes: ['target', 'rel', 'href'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue