mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
safety check
This commit is contained in:
parent
7bc0a4747a
commit
00de9488ba
@ -27,7 +27,9 @@ module ApplicationHelper
|
||||
content_for(:title) { (parts << 'Notebook').join(' - ') } unless parts.empty?
|
||||
end
|
||||
|
||||
def clean_links html
|
||||
def clean_links(html)
|
||||
return '' if html.nil?
|
||||
|
||||
html.gsub!(/\<a href=["'](.*?)["']\>(.*?)\<\/a\>/mi, '<a href="\1" rel="nofollow">\2</a>')
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user