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!)
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!)