summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-07-09 14:26:35 +0200
committerWim <wim@42.be>2017-07-09 14:26:56 +0200
commitb75cf2c189f05f02ce422bef2e93b203528dc9dd (patch)
treefc968f9a0d8481f72a41e3b0e9d009f844ed8440 /bridge
parent1aaa992250ddb6bbed0830ffdebe4ab70c812b0e (diff)
downloadmatterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.tar.gz
matterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.tar.bz2
matterbridge-msglm-b75cf2c189f05f02ce422bef2e93b203528dc9dd.zip
Replace HTML entities (slack). #215
Diffstat (limited to 'bridge')
-rw-r--r--bridge/slack/slack.go2
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}
}