fix error

This commit is contained in:
BOYA,CHIU 2021-08-05 19:14:14 +08:00
parent 106b5db942
commit 5fb447a676
1 changed files with 3 additions and 3 deletions

View File

@ -5,9 +5,9 @@ module TicketsHelper
html = html.gsub("src=\"/uploads/","src=\"http://#{site.site_domain}/uploads/") html = html.gsub("src=\"/uploads/","src=\"http://#{site.site_domain}/uploads/")
temp_html = ActionView::Base.full_sanitizer.sanitize(html) temp_html = ActionView::Base.full_sanitizer.sanitize(html)
urls = URI.extract(temp_html,["http","https"]) urls = URI.extract(temp_html,["http","https"])
urls.each do |url| #urls.each do |url|
html = html.sub(url, "<a href='#{url}' target='_blank'>#{url}</a>") # html = html.sub(url, "<a href='#{url}' target='_blank'>#{url}</a>")
end #end
end end
return html return html
end end