matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
462 stars 151 forks source link

Messages with `<` or `>` are not seen as valid HTML #1562

Open laanwj opened 2 years ago

laanwj commented 2 years ago

While working on a Matrix bot that relies on the messages bridged with formatting included to IRC, we ran into the following issue: even after properly escaping HTML characters, messages with HTML-looking tags e.g. #include <test.h> were dropped.

I suspect the check here is too strict: https://github.com/matrix-org/matrix-appservice-irc/blob/develop/src/irc/formatting.ts#L173