[wwwsearch-commits] r23004 - in wwwsearch/mechanize/trunk: .
mechanize
jjlee at codespeak.net
jjlee at codespeak.net
Fri Feb 3 20:10:48 CET 2006
Author: jjlee
Date: Fri Feb 3 20:10:46 2006
New Revision: 23004
Modified:
wwwsearch/mechanize/trunk/mechanize/_mechanize.py
wwwsearch/mechanize/trunk/test.py
Log:
Fix clean_url usage / name
Modified: wwwsearch/mechanize/trunk/mechanize/_mechanize.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_mechanize.py (original)
+++ wwwsearch/mechanize/trunk/mechanize/_mechanize.py Fri Feb 3 20:10:46 2006
@@ -340,7 +340,7 @@
url = attrs_dict.get(url_attr)
if not url:
continue
- url = clean_url(url)
+ url = clean_url(url, encoding)
text = link.firstText(lambda t: True)
if text is BeautifulSoup.Null:
# follow pullparser's weird behaviour rigidly
Modified: wwwsearch/mechanize/trunk/test.py
==============================================================================
--- wwwsearch/mechanize/trunk/test.py (original)
+++ wwwsearch/mechanize/trunk/test.py Fri Feb 3 20:10:46 2006
@@ -384,7 +384,7 @@
def _test_link_encoding(self, factory):
import urllib
import mechanize
- from mechanize._mechanize import cleanUrl
+ from mechanize._mechanize import clean_url
url = "http://example.com/"
for encoding in ["UTF-8", "latin-1"]:
encoding_decl = "; charset=%s" % encoding
@@ -402,7 +402,7 @@
mdashx2 = u"\u2014".encode(encoding)*2
except UnicodeError:
mdashx2 = '——'
- qmdashx2 = cleanUrl(mdashx2, encoding)
+ qmdashx2 = clean_url(mdashx2, encoding)
# base_url, url, text, tag, attrs
exp = Link(url, "http://example.com/foo/bar%s.html" % qmdashx2,
"blah"+mdashx2, "a",
More information about the wwwsearch-commits
mailing list