4 ms·
The bug is with whoever decided to use a (greedy) URL parser as a URL recognizer. Those are two different tasks — like facial recognition vs. facial identificat
by derefr 6y ago
The bug is with whoever decided to use a (greedy) URL parser as a URL recognizer. Those are two different tasks — like facial recognition vs. facial identification. "Drawing a box" that separates a face/URL from the rest of the image/prose, vs. actually "understanding" that face/URL.
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.
- izacus 6y agoNote that this "whoever" are the authors of Signal chat application which is completely opensource. The bug report for this was closed on a technicality that has very little to do with usability or even understanding the issue. 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.