Fix domains to require a TLD (but allow non-tld domains like "localhost"
in URLS)
This commit is contained in:
parent
6f5bb02b92
commit
68f6218444
@ -1,13 +1,14 @@
|
|||||||
# This file defines some web-related patterns
|
# This file defines some web-related patterns
|
||||||
url: (
|
url: (
|
||||||
("https"/"http"/"ftp") "://" [>..`@ +url-char [`: +url-char] `@]
|
("https"/"http"/"ftp") "://" [>..`@ +url-char [`: +url-char] `@]
|
||||||
(ipv4/ipv6/domain) [`: int] [url-path]
|
(ipv4/ipv6/domain/domain-segment) [`: int] [url-path]
|
||||||
/ "mailto:" email
|
/ "mailto:" email
|
||||||
/ "file://" +(`/ *url-char)
|
/ "file://" +(`/ *url-char)
|
||||||
)
|
)
|
||||||
url-path: +(`/ *url-char) [`? +(+url-char`=+url-char)%`&]
|
url-path: +(`/ *url-char) [`? +(+url-char`=+url-char)%`&]
|
||||||
ipv4: 4 int % `.
|
ipv4: 4 int % `.
|
||||||
ipv6: 8 (4 Hex) % `:
|
ipv6: 8 (4 Hex) % `:
|
||||||
domain: +(+(Abc/digit/`-))%`.
|
domain-segment: +(Abc/digit/`-)
|
||||||
|
domain: 2+domain-segment % `.
|
||||||
url-char: Abc/digit/`$,-,_,.,+,!,*,',(,),,,%
|
url-char: Abc/digit/`$,-,_,.,+,!,*,',(,),,,%
|
||||||
email: +(Abc/digit/`.,-,+) `@ domain
|
email: +(Abc/digit/`.,-,+) `@ domain
|
||||||
|
Loading…
Reference in New Issue
Block a user