href-isvalid.html (7877B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <title>valid href</title> 4 <map name=foo><area href="a:foo.com" alt></map><!-- scheme-private --> 5 <map name=foo><area href="foo:/" alt></map><!-- scheme-private-slash --> 6 <map name=foo><area href="foo://" alt></map><!-- scheme-private-slash-slash --> 7 <map name=foo><area href="foo:/bar.com/" alt></map><!-- scheme-private-path --> 8 <map name=foo><area href="foo://///////" alt></map><!-- scheme-private-path-leading-slashes-only --> 9 <map name=foo><area href="foo://///////bar.com/" alt></map><!-- scheme-private-path-leading-slashes-chars --> 10 <map name=foo><area href="foo:////://///" alt></map><!-- scheme-private-path-leading-slashes-colon-slashes --> 11 <map name=foo><area href="c:/foo" alt></map><!-- scheme-private-single-letter --> 12 <map name=foo><area href="madeupscheme:/example.com/" alt></map><!-- scheme-private-single-slash --> 13 <map name=foo><area href="file:/example.com/" alt></map><!-- scheme-file-single-slash --> 14 <map name=foo><area href="ftps:/example.com/" alt></map><!-- scheme-ftps-single-slash --> 15 <map name=foo><area href="gopher:/example.com/" alt></map><!-- scheme-gopher-single-slash --> 16 <map name=foo><area href="ws:/example.com/" alt></map><!-- scheme-ws-single-slash --> 17 <map name=foo><area href="wss:/example.com/" alt></map><!-- scheme-wss-single-slash --> 18 <map name=foo><area href="javascript:/example.com/" alt></map><!-- scheme-javascript-single-slash --> 19 <map name=foo><area href="mailto:/example.com/" alt></map><!-- scheme-mailto-single-slash --> 20 <map name=foo><area href="madeupscheme:example.com/" alt></map><!-- scheme-private-no-slash --> 21 <map name=foo><area href="ftps:example.com/" alt></map><!-- scheme-ftps-no-slash --> 22 <map name=foo><area href="gopher:example.com/" alt></map><!-- scheme-gopher-no-slash --> 23 <map name=foo><area href="wss:example.com/" alt></map><!-- scheme-wss-no-slash --> 24 <map name=foo><area href="mailto:example.com/" alt></map><!-- scheme-mailto-no-slash --> 25 <map name=foo><area href="data:text/plain,foo" alt></map><!-- scheme-data-no-slash --> 26 <map name=foo><area href="http://user:pass@foo:21/bar;par?b#c" alt></map><!-- userinfo --> 27 <map name=foo><area href="http://[2001::1]" alt></map><!-- host-ipv6 --> 28 <map name=foo><area href="http://[2001::1]:80" alt></map><!-- host-ipv6-port --> 29 <map name=foo><area href="http://f:/c" alt></map><!-- port-none-but-colon --> 30 <map name=foo><area href="http://f:0/c" alt></map><!-- port-0 --> 31 <map name=foo><area href="http://f:00000000000000/c" alt></map><!-- port-00000000000000 --> 32 <map name=foo><area href="http://f:00000000000000000000080/c" alt></map><!-- port-00000000000000000000080 --> 33 <map name=foo><area href="http://a:b@c:29/d" alt></map><!-- userinfo-host-port-path --> 34 <map name=foo><area href="http://foo.com:b@d/" alt></map><!-- userinfo-username-non-alpha --> 35 <map name=foo><area href="http://foo/abcd?efgh?ijkl" alt></map><!-- query-contains-question-mark --> 36 <map name=foo><area href="http://foo/abcd#foo?bar" alt></map><!-- fragment-contains-question-mark --> 37 <map name=foo><area href="http://example.com/foo/%2e" alt></map><!-- path-percent-encoded-dot --> 38 <map name=foo><area href="http://example.com/%20foo" alt></map><!-- path-percent-encoded-space --> 39 <map name=foo><area href="http://example.com/©zbar" alt></map><!-- path-non-ascii --> 40 <map name=foo><area href="http://example.com/foo%41%7a" alt></map><!-- path-percent-encoded-multiple --> 41 <map name=foo><area href="http://example.com/foo%91" alt></map><!-- path-percent-encoded-u0091 --> 42 <map name=foo><area href="http://example.com/foo%00" alt></map><!-- path-percent-encoded-u0000 --> 43 <map name=foo><area href="http://example.com/%3A%3a%3C%3c" alt></map><!-- path-percent-encoded-mixed-case --> 44 <map name=foo><area href="http://example.com/你好你好" alt></map><!-- path-unicode-han --> 45 <map name=foo><area href="http://example.com//foo" alt></map><!-- path-uFEFF --> 46 <map name=foo><area href="http://example.com//foo//bar" alt></map><!-- path-u202E-u202D --> 47 <map name=foo><area href="http://💩" alt></map><!-- host-is-pile-of-poo --> 48 <map name=foo><area href="http💩//:foo" alt></map><!-- path-contains-pile-of-poo --> 49 <map name=foo><area href="http://example.com/foo?💩" alt></map><!-- query-contains-pile-of-poo --> 50 <map name=foo><area href="http://example.com/foo#💩" alt></map><!-- fragment-contains-pile-of-poo --> 51 <map name=foo><area href="http://192.0x00A80001" alt></map><!-- host-192.0x00A80001 --> 52 <map name=foo><area href="http://%25DOMAIN:foobar@foodomain.com" alt></map><!-- userinfo-username-contains-percent-encoded --> 53 <map name=foo><area href="http://@www.example.com" alt></map><!-- userinfo-empty --> 54 <map name=foo><area href="http://:b@www.example.com" alt></map><!-- userinfo-user-empty --> 55 <map name=foo><area href="http://a:@www.example.com" alt></map><!-- userinfo-password-empty --> 56 <map name=foo><area href="http://GOOgoo.com" alt></map><!-- host-exotic-whitespace --> 57 <map name=foo><area href="http://www.foo。bar.com" alt></map><!-- host-exotic-dot --> 58 <map name=foo><area href="http://Go.com" alt></map><!-- host-fullwidth --> 59 <map name=foo><area href="http://你好你好" alt></map><!-- host-idn-unicode-han --> 60 <map name=foo><area href="http://192.168.0.257/" alt></map><!-- host-IP-address-broken --> 61 <map name=foo><area href="//foo/bar" alt></map><!-- scheme-schemeless-relative --> 62 <map name=foo><area href="/" alt></map><!-- path-slash-only-relative --> 63 <map name=foo><area href="/a/b/c" alt></map><!-- path-simple-relative --> 64 <map name=foo><area href="/a%2fc" alt></map><!-- path-percent-encoded-slash-relative --> 65 <map name=foo><area href="/a/%2f/c" alt></map><!-- path-percent-encoded-slash-plus-slashes-relative --> 66 <map name=foo><area href="?" alt></map><!-- query-empty-no-path-relative --> 67 <map name=foo><area href="#" alt></map><!-- fragment-empty-hash-only-no-path-relative --> 68 <map name=foo><area href="#/" alt></map><!-- fragment-slash-relative --> 69 <map name=foo><area href="#;?" alt></map><!-- fragment-semicolon-question-mark-relative --> 70 <map name=foo><area href="#β" alt></map><!-- fragment-non-ascii-relative --> 71 <map name=foo><area href="foo.com" alt></map><!-- scheme-none-relative --> 72 <map name=foo><area href=":" alt></map><!-- path-colon-relative --> 73 <map name=foo><area href=":a" alt></map><!-- path-leading-colon-letter-relative --> 74 <map name=foo><area href=":foo.com" alt></map><!-- path-leading-colon-chars-relative --> 75 <map name=foo><area href=":/" alt></map><!-- path-leading-colon-slash-relative --> 76 <map name=foo><area href=":#" alt></map><!-- path-leading-colon-hash-relative --> 77 <map name=foo><area href=":23" alt></map><!-- path-leading-colon-number-relative --> 78 <map name=foo><area href="/:23" alt></map><!-- path-slash-colon-number-relative --> 79 <map name=foo><area href="::" alt></map><!-- path-leading-colon-colon-relative --> 80 <map name=foo><area href="::23" alt></map><!-- path-colon-colon-number-relative --> 81 <map name=foo><area href="💩http://foo" alt></map><!-- path-starts-with-pile-of-poo --> 82 <map name=foo><area href="/💩" alt></map><!-- path-slash-pile-of-poo --> 83 <map name=foo><area href="File://foo/bar.html" alt></map><!-- scheme-file-uppercase --> 84 <map name=foo><area href="file://C|/foo/bar" alt></map><!-- scheme-file-slash-slash-c-bar --> 85 <map name=foo><area href="file://server/foo/bar" alt></map><!-- scheme-file-host-included --> 86 <map name=foo><area href="file:///foo/bar.txt" alt></map><!-- scheme-file-host-empty --> 87 <map name=foo><area href="file:" alt></map><!-- scheme-file-scheme-only --> 88 <map name=foo><area href="file:/" alt></map><!-- scheme-file-slash-only --> 89 <map name=foo><area href="file://" alt></map><!-- scheme-file-slash-slash-only --> 90 <map name=foo><area href="file:///" alt></map><!-- scheme-file-slash-slash-slash-only --> 91 <map name=foo><area href="file:test" alt></map><!-- scheme-file-no-slash -->