You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this isn't an outright bug, as 'https://www.baidu.com/aaa//bbbb/ccc', with back to back //, is a perfectly valid url. furl doesn't prevent you from creating such urls. you can always do
>>>f=furl()
>>>f.path='a////b'>>>f.url'a////b'
if you want to remove the back to back //, you can normalize() the path. eg
Hello @gruns , can we have a parameter for furl to normalize by default. when you are calling obj.url for instance.
For me it is okay to store internally everything not normalized, but I would like to get at the end normalized path/url.
Another question is, can we support the settings on furl class to have the trailing slash always or never for instance. I would like to create url, add path segments to it and always be sure that it ends with a trailing slash. Sometimes we are adding dynamic user input strings and we do not want to check everything by ourselves.
It looks so unnatural and instead of 1 line I should write 3 lines to make sure I do not have double slashes and also I do have trailing slash (see this / '/' at the end?!
In [2]: u = furl("https://www.baidu.com/aaa") / "/bbbb/ccc"
In [3]: u.url
Out[3]: 'https://www.baidu.com/aaa/bbbb/ccc'
In [4]: u = furl("https://www.baidu.com/aaa/") / "/bbbb/ccc"
In [6]: u.url
Out[6]: 'https://www.baidu.com/aaa//bbbb/ccc'
The text was updated successfully, but these errors were encountered: