scroll-to-css-selector icon indicating copy to clipboard operation
scroll-to-css-selector copied to clipboard

Support for these more complex URLs in services

Open stucox opened this issue 7 years ago • 2 comments

Is it worth adding a mention that there's a potential usability dependency on URL parsing libs/algorithms being updated?

Commonly used services which will identify & link a URL in a block of text (GitHub Markdown, Twitter, Facebook, etc) are unlikely to identify this more complex syntax as a compete URL. Hence people will be apprehensive about using selector targets, even as anchor hrefs in hand-written HTML, as their users may not be able to easily share such links.

Similarly I imagine URL parsing libraries for major programming languages may need to be extended/updated to ensure they handle this syntax as expected, otherwise such URLs may not be usable in combination with software written with those languages (e.g. forms using Django's URLField may not allow them).

This looks like a big hurdle: if the ecosystem & wider web needs a lot of engineering work support this syntax, it's use will be very limited.

stucox avatar May 22 '18 04:05 stucox

Parentheses characters have always been valid inside fragments; SVG fragments such as svgView() have used this for longer than the last decade.

See also: An Improved Liberal, Accurate Regex Pattern for Matching URLs

tigt avatar May 25 '18 04:05 tigt

True, but if existing tooling still doesn't support it, the scope for this to be useful becomes quite limited.

stucox avatar May 25 '18 05:05 stucox