diff options
author | Wim <wim@42.be> | 2017-07-09 14:26:35 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-07-09 14:26:56 +0200 |
commit | b75cf2c189f05f02ce422bef2e93b203528dc9dd (patch) | |
tree | fc968f9a0d8481f72a41e3b0e9d009f844ed8440 /bridge/slack | |
parent | 1aaa992250ddb6bbed0830ffdebe4ab70c812b0e (diff) | |
download | matterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.tar.gz matterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.tar.bz2 matterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.zip |
Replace HTML entities (slack). #215
Diffstat (limited to 'bridge/slack')
-rw-r--r-- | bridge/slack/slack.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 94f74d73..361af025 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -6,6 +6,7 @@ import ( "github.com/42wim/matterbridge/matterhook" log "github.com/Sirupsen/logrus" "github.com/nlopes/slack" + "html" "regexp" "strings" "time" @@ -192,6 +193,7 @@ func (b *Bslack) handleSlack() { texts := strings.Split(message.Text, "\n") for _, text := range texts { text = b.replaceURL(text) + text = html.UnescapeString(text) flog.Debugf("Sending message from %s on %s to gateway", message.Username, b.Account) b.Remote <- config.Message{Text: text, Username: message.Username, Channel: message.Channel, Account: b.Account, Avatar: b.getAvatar(message.Username), UserID: message.UserID} } |