removed gluon/contrib/translitcodec because of backward compatibility issues and because it breaks Pypy
This commit is contained in:
@@ -21,7 +21,6 @@ import unicodedata
|
||||
from cStringIO import StringIO
|
||||
from gluon.utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE
|
||||
from gluon.dal import FieldVirtual, FieldMethod
|
||||
# from gluon.contrib import translitcodec
|
||||
|
||||
regex_isint = re.compile('^[+-]?\d+$')
|
||||
|
||||
@@ -2521,7 +2520,6 @@ def urlify(s, maxlen=80, keep_underscores=False):
|
||||
s = s.decode('utf-8') # to unicode
|
||||
s = s.lower() # to lowercase
|
||||
s = unicodedata.normalize('NFKD', s) # replace special characters
|
||||
# s = s.encode('translit/long') # (proposed change to above line breaks Pypy)
|
||||
s = s.encode('ascii', 'ignore') # encode as ASCII
|
||||
s = re.sub('&\w+?;', '', s) # strip html entities
|
||||
if keep_underscores:
|
||||
|
||||
Reference in New Issue
Block a user