From 041c257e7a03c540e96fb4469fa711026529158e Mon Sep 17 00:00:00 2001 From: Willem Mulder Date: Mon, 2 Dec 2019 22:52:40 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20ReplaceAll(=E2=80=A6)=20with=20Replac?= =?UTF-8?q?e(=E2=80=A6,=20-1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows people to build the bridge with Go 1.11, the current version in Debian stable. --- portal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portal.go b/portal.go index 0015745..aca7996 100644 --- a/portal.go +++ b/portal.go @@ -1177,7 +1177,7 @@ func (portal *Portal) addRelaybotFormat(user *User, evt *mautrix.Event) bool { } if evt.Content.Format != mautrix.FormatHTML { - evt.Content.FormattedBody = strings.ReplaceAll(html.EscapeString(evt.Content.Body), "\n", "
") + evt.Content.FormattedBody = strings.Replace(html.EscapeString(evt.Content.Body), "\n", "
", -1) evt.Content.Format = mautrix.FormatHTML } data, err := portal.bridge.Config.Bridge.Relaybot.FormatMessage(evt, member)