Open dtkav opened 5 years ago
I'd like to use the cursors in the query string, but they currently aren't url safe, so some of the characters are url-encoded.
The goal of this diff is to remove the need for url-encoding the cursor.
There are three main changes:
base64.urlsafe_b64encode
base64.urlsafe_b64decode
=
b64decode
urlsafe_b64decode
Let me know what you think!
Rather than messing around with urlsafe_b64encode, wouldn't it make more sense to do search and replace instead? That would avoid the need to do any fallback and I think the code would be more readable too.
urlsafe_b64encode
I'd like to use the cursors in the query string, but they currently aren't url safe, so some of the characters are url-encoded.
The goal of this diff is to remove the need for url-encoding the cursor.
There are three main changes:
base64.urlsafe_b64encode
andbase64.urlsafe_b64decode
=
), which would otherwise be url-encodedb64decode
ifurlsafe_b64decode
fails (for backwards compatibility)Let me know what you think!