[openstreetmap/openstreetmap-website] Improve data browser to handle multiple links (#1841)
Mikkel Kirkgaard Nielsen
notifications at github.com
Mon Jun 3 23:18:58 UTC 2019
I observe this also for values of the [source](https://wiki.openstreetmap.org/wiki/Key:source) key which I sometimes use for dropping a list of links separated by ';' (example at: https://www.openstreetmap.org/way/547224603).
The value of source, just is like note, is free form text and, as @tomhughes points out, it is not simple to parse and generate correct links for urls present in such.
Some approaches I can think of to improve parsing;
* Support links delimited by double-quotes or angle brackets as [recommended in RFC 3986, appendix C](https://tools.ietf.org/html/rfc3986#appendix-C)
* Assume that links are percent/url-encoded as per [RFC 3986](https://tools.ietf.org/html/rfc3986) (ie. containing no [reserved characters](https://tools.ietf.org/html/rfc3986#section-2.2) like ';' and space.
Looking shortly into [linkify()](https://github.com/openstreetmap/openstreetmap-website/blob/1285bcbd712044720c15e2de2e6bacaf4b0b0a92/app/helpers/application_helper.rb#L4) these might rather be feature requests to [rinku](https://github.com/vmg/rinku) instead.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev