Add url.unquote for input text
This commit is contained in:
parent
9924c51c80
commit
e60176695d
@ -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")
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user