浏览代码

Encode URLs as UTF-8 before opening them.

tags/v0.1^2
Ben Kurtovic 12 年前
父节点
当前提交
f993b847ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
earwigbot/wiki/copyvios/__init__.py 查看文件

@@ -65,7 +65,7 @@ class CopyvioMixIn(object):
ignored, and the original content is returned.
"""
try:
response = self._opener.open(url, timeout=5)
response = self._opener.open(url.encode("utf8"), timeout=5)
except (URLError, timeout):
return None
result = response.read()


正在加载...
取消
保存