Add url.unquote for input text

This commit is contained in:
Jack Stdin 2016-02-15 12:48:32 +03:00
parent 9924c51c80
commit e60176695d
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import re
import urllib
from uuid import UUID
import psycopg2
@ -47,6 +48,7 @@ class FiasFactory:
def find(self, text, strong=False):
try:
text = urllib.unquote(text).decode('utf8')
self.__check_param(text, "text")
self.__check_param(strong, "boolean")

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import re
from aore.config import sphinx_conf
from aore.config import basic
from aore.config import sphinx_conf
class WordEntry:
@ -44,7 +44,7 @@ class WordEntry:
def __init__(self, db, word):
self.db = db
self.word = str(word).decode('utf8')
self.word = str(word)
self.word_len = len(unicode(self.word))
self.variations = []
self.scname = None