Clig Forwarding and Punctuation (Again)

Bug fixed

This is an ever-present problem: what happens when punctuation is used right next to a clig’s URL? Previously, I talked about a Cligs-specific workaround and gave the following example:

"…hey check this out http://cli.gs/abc123"

"..hey my site (http://cli.gs/abc123) is cool…"

The problem is that some programs parse URLs in such a way that requests the wrong clig URL; for the first example above, the clig requested is "abc123" but in the second example, it’s "abc123)". Here are some more examples of problematic URL situations, with how the URL is parsed in an odd way to cause a problem:

"…hey check out this site, http://cli.gs/abc123, which talks about this problem"

"..the default format is described at http://cli.gs/abc123; for example, it… "

"..this is cool http://cli.gs/abc123… LOL! "

".. Finally, please visit my site at http://cli.gs/abc123. Thank you."

As a human being, you know where the URL starts and ends, but as a program, there are lots of these situations that are just plain confusing.

This is a problem that’s very common on Twitter and elsewhere. The previous fix was very simple because Cligs did not have the ability to create vanity URLs like http://cli.gs/my-brand-name. When the vanity URLs feature was introduced, the fix stopped working in some cases, which meant that Cligs returned a 404 not found error instead of forwarding.

I’ve been tracking this issue for a while now and I’ve implemented a general fix earlier today. It works a lot like the previous fix, but it works across a lot more test cases - actually, it work on all the test cases I’ve seen. This means that now Cligs forwards correctly even if the requested clig isn’t quite right.

As ever please tell me if Cligs fails to forward when it clearly should and I’ll update this workaround.

2 Responses to “Clig Forwarding and Punctuation (Again)”

  1. Peter C Says:

    what programs parse URLs incorrectly? I’ve never had an issue with short urls

  2. Pierre Says:

    Hi Peter

    A lot of them badly-written bots that stalk Twitter, but there are others.

    Pierre

Leave a Reply