Sfoglia il codice sorgente

Encode URLs as UTF-8 before opening them.

tags/v0.1^2
Ben Kurtovic 12 anni fa
parent
commit
f993b847ab
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
earwigbot/wiki/copyvios/__init__.py Vedi File

@@ -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()


Caricamento…
Annulla
Salva