Whose bug is it anyway?
shkspr.mobi
shkspr.mobi
There should exist (and, I believe, do exist) algorithms specifically for segmenting micro-format data like URLs, phone numbers, etc., out of prose text. These algorithms are specifically tuned not just for the features of these micro-formats, but also for the features of prose text that might conflict with them (like trailing periods!) The output of such segmentation algorithms can then be fed to actual parser/scanner regexes, to validate and extract meaning from the microformats. (The segmentation algorithms don't always trigger only on valid instances of the micro-format, so you need a stricter check after.)
One might then say that, having such an algorithm in hand, it's the responsibility of any API of a rendering engine that knows it's going to be used for rendering mixed prose+URL content (where the URLs aren't marked up in any way to indicate them), to offer an API for such a URL-segmentation algorithm, and in its docs to mention that this API should be used in place of just throwing the lower-level URL scanner at the problem.
But that supposes that the implementers of such an API have such an algorithm in hand. Often they aren't even aware that such algorithms exist.
Really, I would say that this is a "tragedy of siloed development": if this were a FOSS rendering toolkit, probably someone who knows about the existence of this algorithm would have raised an issue within a relevant repo; and then the folks working on the project could have taken a look and realized it would be better to offer/implement that API, and document its use-case (and warn, in the lower-level API, that it shouldn't be being used for the higher-level use-case.) But because this is a big opaque-from-the-outside project, there's no clear way for a meeting-of-the-minds between "the person that notices the bug and knows that prose:URL segmentation algorithms exist" and "the team that could benefit from that information" to happen.
This is what bug bounty programs are for in security land—to provide a channel for this meeting-of-the-minds to happen. But there isn't really anything like this in UX land.
But this is kinda standard with Signal developers - they are repeatedly giving me the feeling of not quite understanding usability while they build the app. Just think of the PIN verification mess and the mess that's their backup functionality.
Signal should handle this case explicitly in the app, since it's a common frustration for their own users when typing dots, commas and parenthesis.
Android should maybe fix the library, but at the very least fix the documentation to mention that it is not intended to be used in context of prose. Android fixing their library is the least useful of all possible fixes, since it won't propagate to users of Android in any meaningful way for a decade.
The Virgin web team should see that there's elevated 404's, and configure their system to ignore trailing full-stops.
A company the size of Virgin probably already has a process to review marketing messages, but it's likely to be someone eyeballing it, and they should fix it to catch this automatically. They probably already use a marketing automation and scheduling system, that could fix it by verifying the links before pushing.
I'm not sure I agree with this. Eliminating the use of a system library because of single bug likely makes everything _worse_ in the end. You might work around this one bug, but how many other bugs might you be introducing? Or how many bug fixes will you miss out on because Android fixed something upstream? If every app has to implement its own URI parsing because the one provided by the system isn't perfect by default, you end up with an objectively worse situation than you started with. How many bugs around punycode or obscure query param parsing rules or unicode or URIs with credentials or new top-level domains will pop up because every app uses a different library with different behavior and different test suites, or a different version of each library?
Android fixing their software _does_ actually make a difference, especially with recent versions of Android which update much more seamlessly than older versions have.
> Among the ways in which the early web may have been an improvement upon its successors: https://www.w3.org/Addressing/URL/5.1_Wrappers.html .
It's surprising to me that nobody else does this.
Perhaps the Virgin marketing team could go the distance to send U+200C between the end of the URL and the punctuation following it, but I'm not going to.
Did you mean U+200B ZERO WIDTH SPACE?
https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_U...!
in Slack; the trailing ! is part of the URL, but Slack resolutely refused to recognise at such. (I don't know what HN's parser does, so I guess we can regard this as an experiment! EDIT: HN also refuses to recognise it. I tried the <> wrapper suggested elsethread, with amusing results: it makes HN's parser gobble both the ! and the trailing > as part of the URL! Maybe a percent-encoding would have been the way to go.)
The usual work-around is to encode the offending character(s). In this example, `!` becomes `%21`.
https://en.wikipedia.org/wiki/Only_the_Super-Rich_Can_Save_U...
> HN also refuses to recognise it.
The HN software is RFC ignorant. Could you please send an email to the Web master so the bug can get fixed?
Yeah, that was my speculation:
> > Maybe a percent-encoding would have been the way to go.
> The HN software is RFC ignorant. Could you please send an email to the Web master so the bug can get fixed?
I try to be conscientious in general about reporting bugs I find in software, but arguing about the details of Markdown parsers is an endless full-time job with no reward. Of course you are welcome to do it if you think it's worth the time.
So double quotes, angle brackets or whitespace are conforming/acceptable separators.
I have known about this RFC for a long time and hence I have been practically applying it in the wild. Most software deals with the standard separators correctly, and the problem of unwanted trailing punctuation is mitigated.
It's a different thing to say that they should have at least tested it first.
Someone paid to communicate via digital media should understand the limitations of these media. The rule is pretty simple, old and does not require "exact minute details": Don't follow URLs with punctuation characters.
> Check out https://example.com/thing . They've got...
Let's say we were serious about solving this problem (without adopting a strategy like mine above). We would need a set of rules for plaintext-safe URLs. It would comprise:
- An extension to the URL syntax to specify the subset of URLs that are plaintext safe. It might be as simple as a list of punctuation characters that cannot appear at the end of a URL (unless they are percent encoded).
- Guidelines and test vectors for implementers of URL identification algorithms.
- Guidelines for content authors. E.g., "The only characters that may immediately follow a URL are..."
- A recommendation for web developers to ensure plaintext safefy when creating new URLs.
The issue is specific to messaging apps, in the context of text messages and copy/pasted URL, where an URL might get an extra dot as if concluding a sentence.
If you send a link via sms, some number of people are going to type it in a url bar while looking at their phone, that's a lossy process. In addition to whatever terrible things happened during sms transmission.
Apache httpd comes with mod_speling. https://httpd.apache.org/docs/mod/mod_speling.html
edit: it's not "clearly the UI layer" as I said... it should be fixed at the layer that transforms the text into structured data. That's where I'd put my tests