gbin/err — pull request #163 by mk-fg (2013-05-19 11:39:09+00:00)
Title: Strip XHTML/XML formatting in all irc messages.

Not sure if I did it right, as it currently will strip any html-like things that might be there intentionally (but in unescaped form? is it even possible?).

E.g. !repos gives this to IRC channel:

[17:05:46]
[17:05:46]
[17:05:46]

[17:05:46]

[17:05:46]

Repos (P = Private repo, * = installed):

[17:05:46]

[17:05:46] [ ] err-calcbot a smart calculator, unit converter and math solver

[17:05:46] [ ] err-codebot can make the bot execute code snippet in C, CPP and Python

...

Which is kinda awful for readability.

With fix, text is cleaned of markup - only valid one, and escaped non-markup entities should be unescaped, iiuc:

[17:07:34] Repos (P = Private repo, * = installed):
[17:07:34] [ ] err-calcbot a smart calculator, unit converter and math solver
[17:07:34] [ ] err-codebot can make the bot execute code snippet in C, CPP and Python
...

Can `Message.getBody()` return a valid `stuff` markup in unescaped (e.g. `<tag>stuff</tag>`, or its xml equivalent) form from some plugin?

If so, might be not a perfect solution, but cheap easy fixes can be either to escape everything not marked as xhtml (if that's a thing) or make it configurable, shifting a bit of a burden onto user.