[OSM-dev] [Talk-GB] OSM shortlinks problem

Ævar Arnfjörð Bjarmason avarab at gmail.com
Tue Mar 30 09:32:19 BST 2010


On Mon, Mar 29, 2010 at 23:28, Matt Amos <zerebubuth at gmail.com> wrote:
> On Mon, Mar 29, 2010 at 11:34 PM, Gregory <nomoregrapes at googlemail.com> wrote:
>> On 29 March 2010 15:15, Matt Amos <zerebubuth at gmail.com> wrote:
>>>
>>> http://trac.openstreetmap.org/changeset/16271
>>>
>>> yeah, it was originally =, but changed to - to work with twitter.
>>> given that the characters A-Z, a-z, 0-9, _, @, - and = have already
>>> been used, what's the next best character? ~? +?
>>
>> Well I suggested that you remove problematic symbols, and just use A-Z, a-z,
>> 0-9 if need be.
>
> we're already using those symbols in a way that makes it difficult to
> reuse them for trailing characters without breaking existing links.
> if anyone can find a character which isn't in the list above, and
> doesn't break at least one URL-detector out there, then that's the
> best way to fix this.
>
> the alternative is to use some other scheme, for example appending
> .1/.2 instead of -/-- which makes some zoom levels a char longer. or
> possibly pre-pending the dashes, since they're usually picked up in
> the middle of an URL - but this makes char deletion from the end work
> slightly differently.
>
> it's also worth noting that, in the current scheme, shortlinks can end
> in @ or _ - do these also break the URL detectors?

Yes, and not just if they end in @, e.g. if I paste
http://osm.org/go/e0z@3K9-- into Twitter that yields a link to
http://osm.org/go/e0z followed by a reply to the user 3K9 followed by
two trailing --

I think you could get maximum comparability with the most amount of
silly URL extractors this way:




More information about the dev mailing list