Per RFC 3986, 'Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-").' However, the is_file_url_or_path() function in xdg-open relies on the following regular expression to identify valid URI schemes:
Not only does that fail on URI schemes that contain numbers (such as h323, irc6, pkcs11, tn3270, etc.) it also incorrectly identifies strings beginning with + . or - as valid URIs.
I propose the following replacement:
This bug is present in the most recent version of xdg-open in git.
Created attachment 139449 [details] [review]