Closed colinsarah closed 2 years ago
https://xxxxx.com/home/javascript:void(0);
is a valid URL; i.e. none of the characters of javascript:void(0);
are invalid path characters that need to be percent-encoded
as such, to get https://xxxxx.com/home
from https://xxxxx.com/home/javascript:void(0);
you can simply pop the last path segment. eg
>>> f = furl('https://xxxxx.com/home/javascript:void(0);')
>>> f.path.segments.pop()
>>> f.url
'https://xxxxx.com/home'
does that suffice for your use case?
thanks!
HI,here url is
https://xxxxx.com/home/javascript:void(0);
is there any func to get this:https://xxxxx.com/home