summaryrefslogtreecommitdiff
path: root/app/models/integrations/chat_message/base_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integrations/chat_message/base_message.rb')
-rw-r--r--app/models/integrations/chat_message/base_message.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/integrations/chat_message/base_message.rb b/app/models/integrations/chat_message/base_message.rb
index 554b422c0fa..501b214a769 100644
--- a/app/models/integrations/chat_message/base_message.rb
+++ b/app/models/integrations/chat_message/base_message.rb
@@ -5,10 +5,6 @@ module Integrations
class BaseMessage
RELATIVE_LINK_REGEX = %r{!\[[^\]]*\]\((/uploads/[^\)]*)\)}.freeze
- # Markup characters which are used for links in HTML, Markdown,
- # and Slack "mrkdwn" syntax (`<http://example.com|Label>`).
- UNSAFE_MARKUP_CHARACTERS = '<>[]|'
-
attr_reader :markdown
attr_reader :user_full_name
attr_reader :user_name
@@ -85,7 +81,7 @@ module Integrations
# - https://api.slack.com/reference/surfaces/formatting#escaping
# - https://gitlab.com/gitlab-org/slack-notifier#escaping
def strip_markup(string)
- string&.delete(UNSAFE_MARKUP_CHARACTERS)
+ SlackMarkdownSanitizer.sanitize(string)
end
def attachment_color