Skip to content

Commit

Permalink
Merge pull request #14 from eriolv/master
Browse files Browse the repository at this point in the history
Fixed escaping HTML entities within strings behavior change in  python-beautifulsoup 3.2.1
  • Loading branch information
brendonh committed Jun 25, 2012
2 parents 64868b4 + c444a8d commit 32b2f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyth/plugins/xhtml/reader.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def format(self, soup):
text = unicode(node) text = unicode(node)
lines = [x.strip() for x in text.splitlines()] lines = [x.strip() for x in text.splitlines()]
text = ' '.join(lines) text = ' '.join(lines)
node.replaceWith(text) node.replaceWith(BeautifulSoup.BeautifulSoup(text))
soup = BeautifulSoup.BeautifulSoup(unicode(soup)) soup = BeautifulSoup.BeautifulSoup(unicode(soup))
# replace all <br/> tag by newline character # replace all <br/> tag by newline character
for node in soup.findAll('br'): for node in soup.findAll('br'):
Expand Down

0 comments on commit 32b2f6b

Please sign in to comment.