File: 02_fix-escaping-html-entities-behavior-change.patch

package info (click to toggle)
pyth 0.5.6-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 312 kB
  • sloc: python: 1,609; makefile: 7
file content (16 lines) | stat: -rw-r--r-- 717 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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'):