From 80e45fee8528915349d85db488e03a75690854e2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 27 Apr 2016 20:43:11 +1000 Subject: [PATCH] Revert "Deal with Internationalized Domain Name in URI" This reverts commit a68af5f1999c9772dc390c86559b57bf95d07542. Patch does not fix the issue on my machine, so reverting for now. --- aqt/editor.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/aqt/editor.py b/aqt/editor.py index d758c7903..8ad50f7ce 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -7,8 +7,6 @@ import urllib2 import ctypes import urllib -from urlparse import urlparse, urlunparse - from anki.lang import _ from aqt.qt import * from anki.utils import stripHTML, isWin, isMac, namedtmp, json, stripHTMLMedia @@ -839,12 +837,6 @@ to a cloze type first, via Edit>Change Note Type.""")) self.mw.progress.start( immediate=True, parent=self.parentWindow) try: - # urllib2 doesn't work properly with IRI - # The following code translates IRI to standard URI - scheme, netloc, path, params, query, fragment = urlparse(url) - idna_netloc = urllib2.unquote(netloc.encode("ascii")).decode("utf-8").encode("idna") - url = urlunparse([scheme, idna_netloc, path, params, query, fragment]) - req = urllib2.Request(url, None, { 'User-Agent': 'Mozilla/5.0 (compatible; Anki)'}) filecontents = urllib2.urlopen(req).read()