diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-10-12 22:36:01 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-26 23:46:32 +0100 |
commit | 2c0e17cb977a1e8782799b337df8b1583d019906 (patch) | |
tree | 75563e440e9eac14950fa1a71a83e64df20e52d0 /src/web/utils.py | |
parent | fixing sqlalchemy resolving warning (diff) | |
download | newspipe-2c0e17cb977a1e8782799b337df8b1583d019906.tar.gz newspipe-2c0e17cb977a1e8782799b337df8b1583d019906.tar.bz2 newspipe-2c0e17cb977a1e8782799b337df8b1583d019906.zip |
bootstraping react
Diffstat (limited to 'src/web/utils.py')
-rwxr-xr-x | src/web/utils.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/web/utils.py b/src/web/utils.py index 6182eb0e..fcd791e8 100755 --- a/src/web/utils.py +++ b/src/web/utils.py @@ -57,8 +57,7 @@ from contextlib import contextmanager from flask import request import conf -from flask import g -from bootstrap import application as app, db +from bootstrap import db from web import controllers from web.models import User, Feed, Article from web.lib.utils import clear_string @@ -270,16 +269,6 @@ def open_url(url): return (False, error) -def clear_string(data): - """ - Clear a string by removing HTML tags, HTML special caracters - and consecutive white spaces (more that one). - """ - p = re.compile('<[^>]+>') # HTML tags - q = re.compile('\s') # consecutive white spaces - return p.sub('', q.sub(' ', data)) - - def load_stop_words(): """ Load the stop words and return them in a list. |