diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2a91006b0..ae682e1fc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -34,7 +34,7 @@ module ApplicationHelper def sanitise_characters(string) return string unless string - string.tr("'", "’").tr("&", "&") + string.gsub(/[^a-zA-Z0-9\s\-\_\'\&]/, '').tr("'", "’").tr("&", "&") end private