Created
April 15, 2019 14:40
-
-
Save astef/085f730b9295cb3abcd681708703e00f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = new[] | |
{ | |
// simple urls are fine | |
"http://example", | |
"ftp://example", | |
"file://example", | |
// custom protocols are not supported | |
"tcp://example", | |
// strange characters are fine | |
"ftp://abc/exa$m`=%#pl~{}<>e", | |
// but not in the root | |
"ftp://exam$ple", | |
"ftp://exam:ple", | |
"file://exa%mple", | |
// except it is a colon and it's in the end | |
"ftp://example:", | |
"ftp://example:/abc", | |
// or if it is a number sign or question mark | |
"file://exam?ple", | |
"file://exa#mple", | |
// and there's a magic word: | |
"shell:example", | |
"shell:exam`@#$%^&*()-=<>{}?p/le", | |
// may be it's something like mailto links: | |
"mailto:example", | |
// which allow any mess as an email | |
"mailto:example/!@#$%^&{}", | |
// but not on the root level | |
"mailto:example!@#$%^&{}", | |
// or, it will accept it in the root, but put a symbol after '@' | |
"mailto:example!@x#$%^&{}" | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment