diff options
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. |