diff --git a/app/helpers/activity_helper.rb b/app/helpers/activity_helper.rb index f65882547..965e828a2 100644 --- a/app/helpers/activity_helper.rb +++ b/app/helpers/activity_helper.rb @@ -9,7 +9,7 @@ module ActivityHelper else title = truncate(activity_title, length: len) end - message = message.gsub(/#{activity_title}/, title ) + message = message.gsub(/#{Regexp.escape(activity_title)}/, title ) end sanitize_input(message) if message end