Description: Fixed escaping HTML entities within strings behavior change in
 python-beautifulsoup 3.2.1.
Author: Daniele Tricoli <eriol@mornie.org>
Forwarded: https://github.com/brendonh/pyth/pull/14
Last-Update: 2012-06-25
--- a/pyth/plugins/xhtml/reader.py
+++ b/pyth/plugins/xhtml/reader.py
@@ -55,7 +55,7 @@
                 text = unicode(node)
                 lines = [x.strip() for x in text.splitlines()]
                 text = ' '.join(lines)
-                node.replaceWith(text)
+                node.replaceWith(BeautifulSoup.BeautifulSoup(text))
         soup = BeautifulSoup.BeautifulSoup(unicode(soup))
         # replace all <br/> tag by newline character
         for node in soup.findAll('br'):
