This commit is contained in:
St.Huang 2018-07-31 01:40:21 +08:00
parent 44e55178dd
commit c02da14d01
2 changed files with 5 additions and 3 deletions

View File

@ -238,9 +238,10 @@ class Service(object):
@property
def quote_word(self):
word = re.sub(r'</?\w+[^>]*>', '', self.word)
return urllib2.quote(
self.word.encode('utf-8') if isinstance(self.word, unicode)
else self.word
word.encode('utf-8') if isinstance(word, unicode)
else word
)
@property

View File

@ -241,7 +241,8 @@ class Service(object):
@property
def quote_word(self):
return urllib2.quote(self.word)
word = re.sub(r'</?\w+[^>]*>', '', self.word)
return urllib2.quote(word)
@unique.setter
def unique(self, value):