mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 11:41:19 +08:00
fix bug with special characters when truncating activities titles
This commit is contained in:
parent
d88b21fb5e
commit
7c2b657b0e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue