File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ def _strip_capstring(capstring: str) -> str:
33
33
if capstring .startswith ("mxc://" ):
34
34
capstring = capstring [6 :]
35
35
if "/" in capstring :
36
- capstring = capstring [ capstring . rindex ("/" ) + 1 :]
36
+ _ , _ , capstring = capstring . rpartition ("/" )
37
37
if "?" in capstring :
38
- capstring = capstring [ capstring . rindex ("?" ) + 1 :]
38
+ _ , _ , capstring = capstring . rpartition ("?" )
39
39
return capstring
40
40
41
41
42
42
def deserialize_capabilities (capstring : str ) -> Dict [str , Any ]:
43
43
capstring = _strip_capstring (capstring )
44
- capdict = url_decode (capstring .encode ("utf-8" ))
44
+ capdict = url_decode (capstring .encode ())
45
45
capabilities : Dict [str , Any ] = dict ()
46
46
for key in capdict :
47
47
value = capdict .getlist (key , type = int_bool )
You can’t perform that action at this time.
0 commit comments