Method: Slack::BlockKit::Formatting#escape
- Defined in:
- lib/slack/block_kit/formatting.rb
#escape(text) ⇒ Object
Escape special characters (<,>,&) with their HTML entity code so Slack’s text parsers knows to interpret them as literals.
116 117 118 119 120 121 |
# File 'lib/slack/block_kit/formatting.rb', line 116 def escape(text) text .gsub('&', '&') .gsub('>', '>') .gsub('<', '<') end |