diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cfc59dfa..b181b3cc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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\>/mi, '\2') html.html_safe end