encode url query

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2930 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-11-09 07:46:05 +00:00
parent 77b79468c7
commit 9eab0056ac

View file

@ -268,6 +268,8 @@ def url_parse_query (query):
"""
Parse and re-join the given CGI query.
"""
if isinstance(query, unicode):
query = query.encode('ascii', 'ignore')
# if ? is in the query, split it off, seen at msdn.microsoft.com
if '?' in query:
query, append = query.split('?', 1)