progval / Supybot-plugins

Collection of plugins for Supybot/Limnoria I wrote or forked.
https://github.com/ProgVal/Limnoria/
107 stars 63 forks source link

Wikipedia: replace <b> and </b> with \x02 for bold output #258

Closed jlu5 closed 9 years ago

jlu5 commented 9 years ago

This is a bit of an ugly hack, but the bolding works well in certain Wikipedia articles and makes the text snippet easier to read.

Using etree's built in replace will cause an error since \x02 isn't an allowed character in XML. Therefore, I have to do this indirectly using replaces (I don't know of a better way!)