42wim/matterbridge

[mumble] Escape html tags in plaintext

vitoyucepi opened this issue · 0 comments

Describe the bug
Mumble treats messages internally as HTML, which can cause plain text from other chats to be interpreted as HTML. This can result in issues, such as the failure of the RemoteNickFormat = '[{PROTOCOL}] <{NICK}>: ' function in Mumble, where <{NICK}> is an HTML tag. To work around this, HTML sequences can be escaped using &lt;{NICK}&gt;.

The same behavior exists for messages: Mumble treats <1> as HTML code instead of plaintext.

To Reproduce

  1. Configure bridge with mumble.
  2. Send a message containing html code from another protocol, for example, XMPP.
    1<2>3
  3. Mumble will show 13.

Expected behavior
Escape HTML sequences in a message to mumble.

Screenshots/debug logs
N/A

Environment (please complete the following information):

  • OS: Linux
  • Matterbridge version: 1.26.1-dev
  • If self compiled: 56e7bd0

Additional context

[general]
RemoteNickFormat = '[{PROTOCOL}] <{NICK}>: '

[xmpp.x]
Server = 'xmpp:5222'
Jid = 'bridge@xmpp'
Password = 'pass'
Muc = 'muc.xmpp'
Nick = 'bridge'

[mumble.m]
Server = 'mumble:64738'
Nick = 'bridge'

[[gateway]]
name = 'gateway1'
enable = true

[[gateway.inout]]
account = 'mumble.m'
channel = 0

[[gateway.inout]]
account = 'xmpp.x'
channel = 'chat'