Consider the following three example URLs in context:
- Here is a picture of a smile: http://example.com/render/emoticon.php?s=.
- See your favourite news source (e.g. www.bbc.co.uk).
I typed those as plain text, so you can see how Moodle's filter_urltolink handles them. Currently it gets 1. and 2. right, but 3. wrong.
I filed MDL-22390 ages ago because I am always doing things like 3., and I had never thought of examples 1. and 2.
I am pleased to say that this filter has unit tests, including those tricky cases, so I am now aware of them.
Clearly we cannot correctly handle all three examples (at least not without serious artificial intelligence). So, I have come here to ask what we think would be the better behaviour. Comments please.