From b75cf2c189f05f02ce422bef2e93b203528dc9dd Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 9 Jul 2017 14:26:35 +0200 Subject: Replace HTML entities (slack). #215 --- bridge/slack/slack.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bridge/slack') 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} } -- cgit v1.2.3