diff options
author | cedricbonhomme <devnull@localhost> | 2011-06-01 09:20:39 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2011-06-01 09:20:39 +0200 |
commit | 498967b610b7c29d6c87a64ced8ac5033f02bc31 (patch) | |
tree | c2f9643313c2a2b317352e789fffd85674369102 /utils.py | |
parent | Renamed the string 'feeds' to 'articles' in the management page. (diff) | |
download | newspipe-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-x | utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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): """ |