diff options
author | Cameron Fieber <cameron@fieber.ca> | 2019-03-25 22:30:25 -0700 |
---|---|---|
committer | Rex Dieter <rdieter@gmail.com> | 2019-04-01 19:34:33 +0000 |
commit | bfcefa162b1dcd6d62e193019969ff2f5ff331cf (patch) | |
tree | 15176383468b0bdc0612a9be0deef802e2be3943 | |
parent | 24f28790612cb5d7479516cecb570265b5fbf806 (diff) |
support digits in uri scheme regex
As per RFC 2396[1] a valid URI scheme may contain a digit:
scheme = alpha *( alpha | digit | + | - | . )
[1]: https://www.ietf.org/rfc/rfc2396.txt
-rw-r--r-- | scripts/xdg-open.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index c38e1e0..202f3e3 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -72,7 +72,7 @@ get_key() is_file_url_or_path() { if echo "$1" | grep -q '^file://' \ - || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then + || ! echo "$1" | egrep -q '^[[:alpha:]][[:alpha:][:digit:]+\.\-]*:'; then return 0 else return 1 |