Missing scheme: freenet


#1

Section “6.7 Autolinks” lacks the scheme support for Freenet.


#2

Is it even a good idea to give an explicit list of schemes? What happens when there are new schemes? We change the spec and every implementation with it?


#3

I am not sure where the spec has taken this list from, but it looks fairly close to IANA’s. (I have not done a side-by-side, might be equal.) Looking through the officially recognised schemes shows freenet is not registered, which would explain why it is missing.

It might be the spec is requiring matching the scheme so it will not accidentally change XHTML elements under a namespace into links, e.g. <svg:svg> opens an SVG element under the SVG syntax. Example from MDN:

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:svg="http://www.w3.org/2000/svg">
  <body>
    <h1>SVG embedded inline in XHTML</h1>
    <svg:svg width="300px" height="200px">
      <svg:circle cx="150" cy="100" r="50" fill="#ff0000"/>
    </svg:svg>
  </body>
</html>

IIRC HTML5 did away with this and is no longer allowing colons within tag names, so if SMD is only to look at the latest HTML specification it could probably drop all such limitations.


#4

@jgm can you clarify if the CommonMark spec is using the IANA scheme list as a source? This might alleviate some of the complaints about it…

Also @joallard this is already covered in an existing topic.


#5

+++ codinghorror [Oct 03 14 23:49 ]:

[2]@jgm can you clarify if the CommonMark spec is using the IANA scheme
list as a source? This might alleviate some of the complaints about
it…

If I recall correctly, the list consists of the IANA official + provisional schemes, plus the unofficial schemes “coap”, “doi”, and “javascript”.

I am sympathetic with the desire not to hard-code a list of schemes in the spec. The question is whether there’s a reliable heuristic for recognizing when the thing inside <> is a URI that doesn’t involve a list of schemes, and that acknowledges the fact that XML tags might have namespaces, e.g. <m:math>.


What is the point of limiting URI schemes in autolinks?