fix bug with special characters when truncating activities titles

This commit is contained in:
Mojca Lorber 2017-06-01 15:10:26 +02:00
parent d88b21fb5e
commit 7c2b657b0e

View file

@ -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