Enable Style/WordArray
This commit is contained in:
parent
d1439f8a52
commit
6eeba14885
19 changed files with 23 additions and 22 deletions
|
@ -2,6 +2,6 @@ module StringToHtmlHelper
|
|||
def string_to_html(str)
|
||||
html_formatted = simple_format(str)
|
||||
with_links = html_formatted.gsub(URI.regexp, '<a target="_blank" href="\0">\0</a>')
|
||||
sanitize(with_links, attributes: %w(href target))
|
||||
sanitize(with_links, attributes: ['href', 'target'])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue