aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-01 09:20:39 +0200
committercedricbonhomme <devnull@localhost>2011-06-01 09:20:39 +0200
commit498967b610b7c29d6c87a64ced8ac5033f02bc31 (patch)
treec2f9643313c2a2b317352e789fffd85674369102 /utils.py
parentRenamed the string 'feeds' to 'articles' in the management page. (diff)
downloadnewspipe-498967b610b7c29d6c87a64ced8ac5033f02bc31.tar.gz
newspipe-498967b610b7c29d6c87a64ced8ac5033f02bc31.tar.bz2
newspipe-498967b610b7c29d6c87a64ced8ac5033f02bc31.zip
Minor improvement: HTML purification of articles description with BeautifulSoup. The purification is done before the insertion in the database.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 5587ce0e..e5fc455d 100755
--- a/utils.py
+++ b/utils.py
@@ -103,7 +103,7 @@ def clear_string(data):
"""
p = re.compile(r'<[^<]*?/?>') # HTML tags
q = re.compile(r'\s') # consecutive white spaces
- return p.sub('', q.sub(' ', data))
+ return p.sub('', q.sub(' ', data.replace('', '')))
def unescape(text):
"""
bgstack15