From 607d5b9e5f50a94c94bb20f077e97fdf3c14dc29 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 5 Jan 2016 22:11:51 -0800 Subject: Removed whitelist of valid schemes. Now a scheme is any sequence of 2-32 characters, beginning with an ASCII letter, and containing only ASCII letters, digits, and the symbols `-`, `+`, `.`. Changed several spec examples accordingly. Discussion at http://talk.commonmark.org/t/what-is-the-point-of-limiting-uri-schemes-in-autolinks/555/26 --- spec.txt | 64 ++++++++++++++++++++++++++-------------------------------------- 1 file changed, 26 insertions(+), 38 deletions(-) (limited to 'spec.txt') diff --git a/spec.txt b/spec.txt index 9c495ab..dda255d 100644 --- a/spec.txt +++ b/spec.txt @@ -7545,34 +7545,13 @@ An [absolute URI](@absolute-uri), for these purposes, consists of a [scheme] followed by a colon (`:`) followed by zero or more characters other than ASCII [whitespace] and control characters, `<`, and `>`. If -the URI includes these characters, you must use percent-encoding +the URI includes these characters, they must be percent-encoded (e.g. `%20` for a space). -The following [schemes](@scheme) -are recognized (case-insensitive): -`coap`, `doi`, `javascript`, `aaa`, `aaas`, `about`, `acap`, `cap`, -`cid`, `crid`, `data`, `dav`, `dict`, `dns`, `file`, `ftp`, `geo`, `go`, -`gopher`, `h323`, `http`, `https`, `iax`, `icap`, `im`, `imap`, `info`, -`ipp`, `iris`, `iris.beep`, `iris.xpc`, `iris.xpcs`, `iris.lwz`, `ldap`, -`mailto`, `mid`, `msrp`, `msrps`, `mtqp`, `mupdate`, `news`, `nfs`, -`ni`, `nih`, `nntp`, `opaquelocktoken`, `pop`, `pres`, `rtsp`, -`service`, `session`, `shttp`, `sieve`, `sip`, `sips`, `sms`, `snmp`,` -soap.beep`, `soap.beeps`, `tag`, `tel`, `telnet`, `tftp`, `thismessage`, -`tn3270`, `tip`, `tv`, `urn`, `vemmi`, `ws`, `wss`, `xcon`, -`xcon-userid`, `xmlrpc.beep`, `xmlrpc.beeps`, `xmpp`, `z39.50r`, -`z39.50s`, `adiumxtra`, `afp`, `afs`, `aim`, `apt`,` attachment`, `aw`, -`beshare`, `bitcoin`, `bolo`, `callto`, `chrome`,` chrome-extension`, -`com-eventbrite-attendee`, `content`, `cvs`,` dlna-playsingle`, -`dlna-playcontainer`, `dtn`, `dvb`, `ed2k`, `facetime`, `feed`, -`finger`, `fish`, `gg`, `git`, `gizmoproject`, `gtalk`, `hcp`, `icon`, -`ipn`, `irc`, `irc6`, `ircs`, `itms`, `jar`, `jms`, `keyparc`, `lastfm`, -`ldaps`, `magnet`, `maps`, `market`,` message`, `mms`, `ms-help`, -`msnim`, `mumble`, `mvn`, `notes`, `oid`, `palm`, `paparazzi`, -`platform`, `proxy`, `psyc`, `query`, `res`, `resource`, `rmi`, `rsync`, -`rtmp`, `secondlife`, `sftp`, `sgn`, `skype`, `smb`, `soldat`, -`spotify`, `ssh`, `steam`, `svn`, `teamspeak`, `things`, `udp`, -`unreal`, `ut2004`, `ventrilo`, `view-source`, `webcal`, `wtai`, -`wyciwyg`, `xfire`, `xri`, `ymsgr`. +For purposes of this spec, a [scheme](@scheme) is any sequence +of 2--32 characters beginning with an ASCII letter and followed +by any combination of ASCII letters, digits, or the symbols plus +("+"), period ("."), or hyphen ("-"). Here are some valid autolinks: @@ -7602,6 +7581,27 @@ Uppercase is also fine:

MAILTO:FOO@BAR.BAZ

. +Note that many strings that count as [absolute URI]s for +purposes of this spec are not valid URIs, because their +schemes are not registered or because of other problems +with their syntax: + +. + + + + + + + +. +

a+b+c:d

+

made-up-scheme://foo,bar

+

http://../

+

localhost:5001/foo

+. + + Spaces are not allowed in autolinks: . @@ -7661,12 +7661,6 @@ These are not autolinks:

<>

. -. - -. -

<heck://bing.bong>

-. - . < http://foo.bar > . @@ -7679,12 +7673,6 @@ These are not autolinks:

<foo.bar.baz>

. -. - -. -

<localhost:5001/foo>

-. - . http://example.com . -- cgit v1.2.3