Beautiful Soup 3 doesn't encode characters like < and > on output. The good news is that Beautiful Soup 4 does, unless you deliberately prevent it.
I've changed BS3 to give strings the same treatment it gives attribute values. Angle brackets and bare ampersands will be converted to XML entities on the way out. I'll do a 3.2.1 BS3 release with just this bugfix.
Beautiful Soup 3 doesn't encode characters like < and > on output. The good news is that Beautiful Soup 4 does, unless you deliberately prevent it.
I've changed BS3 to give strings the same treatment it gives attribute values. Angle brackets and bare ampersands will be converted to XML entities on the way out. I'll do a 3.2.1 BS3 release with just this bugfix.