mirror of https://github.com/scrapy/scrapy.git
safe_url_string should not escape unreserved marks (see RFC 2396, sec
2.3) --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40285
This commit is contained in:
parent
3f32bae45f
commit
a38c72bb05
|
|
@ -37,7 +37,8 @@ def urljoin_rfc(base, ref):
|
|||
|
||||
|
||||
_reserved = ';/?:@&=+$|,#' # RFC 2396 (Generic Syntax)
|
||||
_safe_chars = urllib.always_safe + '%' + _reserved
|
||||
_unreserved_marks = "-_.!~*'()" #RFC 2396 sec 2.3
|
||||
_safe_chars = urllib.always_safe + '%' + _reserved + _unreserved_marks
|
||||
|
||||
def safe_url_string(url, use_encoding='utf8'):
|
||||
"""Convert a unicode (or utf8 string) object into a legal URL.
|
||||
|
|
|
|||
Loading…
Reference in New Issue