-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove tab and newlines in url.safe_url_string #133
Conversation
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 95.3% 95.32% +0.01%
==========================================
Files 7 7
Lines 469 471 +2
Branches 93 93
==========================================
+ Hits 447 449 +2
Misses 15 15
Partials 7 7
|
@kmike Applied both suggestions, thank you! |
@@ -34,9 +34,12 @@ def _quote_byte(error): | |||
|
|||
_safe_chars = RFC3986_RESERVED + RFC3986_UNRESERVED + EXTRA_SAFE_CHARS + b'%' | |||
|
|||
_ascii_tab_newline_re = re.compile(r'[\t\n\r]') # see https://infra.spec.whatwg.org/#ascii-tab-or-newline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are linking to the ‘living standard’, which changes constantly, I think we should not link directly to it, but through the Wayback Machine. Both here and on the docstring below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wayback Machine is being blocked and unblocked in Russia, so I'm fine with whatwg link :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @elacuesta!
See scrapy/scrapy#3855
Forgive me if this is an overly naïve approach, I must admit I'm not overly familiar with the formalities of URL definition and handling.