lib/slack-notifier/util/escape.rb
# frozen_string_literal: true
module Slack
class Notifier
module Util
module Escape
HTML_REGEXP = /[&><]/
HTML_REPLACE = { "&" => "&", ">" => ">", "<" => "<" }.freeze
def self.html string
string.gsub(HTML_REGEXP, HTML_REPLACE)
end
end
end
end
end