test_helpers.py
4.49 KB
-
To support UNICODE xblock.location · ef257fb5
When people use unicode course org name(e.g Chinese) ,urllib.quote cannot format unicode char like: ```shell >>> import urllib >>> loc = 'i4x://创联/7302478/chapter/4ab413b41ad9447db41668bed03f149f' >>> urllib.quote(loc) 'i4x%3A//%E5%88%9B%E8%81%94/7302478/chapter/4ab413b41ad9447db41668bed03f149f' >>> urllib.quote(unicode(loc)) Traceback (most recent call last): File "<console>", line 1, in <module> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 6: ordinal not in range(128) >>> ``` so I open this pull
Jason Zhu committed