4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-04 10:07:44 +00:00

Update dependencies (#1813)

This commit is contained in:
Wim
2022-04-25 23:50:10 +02:00
committed by GitHub
parent 2fca3c7563
commit 67adad3e08
288 changed files with 266038 additions and 3755 deletions

View File

@ -50,10 +50,12 @@ func DetectChannelType(channelID string) ChannelType {
}
}
// initialize replacer only once (if needed)
var escapeReplacer = strings.NewReplacer("&", "&amp;", "<", "&lt;", ">", "&gt;")
// EscapeMessage text
func EscapeMessage(message string) string {
replacer := strings.NewReplacer("&", "&amp;", "<", "&lt;", ">", "&gt;")
return replacer.Replace(message)
return escapeReplacer.Replace(message)
}
// Retryable errors return true.