The URL RegEx pattern rather often creates false positives - for
example, "foo:<br>bar" will be rendered as a link.
Isn't there a standardized RegEx for such a frequently-used pattern?
I've checked RegExLib.com, but that's not really a great resource. There
also seems to be a "Regexp::Common" library for Perl, but I'm not sure
whether those patterns could be used in JavaScript.
Is anyone familiar with this sort of thing? If there's a proven,
JS-compatible RegEx for URLs (or URIs), it should be easy to integrate
that into the the core...
-- F.
Generally, the motivation behind the changes has been to accommodate a
wider range of protocols (eg skype and outlook). I share your desire
for a standardised format, but I don't think it exists. I suspect that
we might be better off making the regexp more conservative and
specific, but perhaps providing some new markup to explicitly force an
ambiguous external link to be recognised.
Cheers
Jeremy
--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com
Shifting the blame, eh? ;)
> we might be better off making the regexp more conservative and
> specific, but perhaps providing some new markup to explicitly force an
> ambiguous external link to be recognised.
Actually, I don't think this is a huge problem (it's usually easy to
prevent linkification by adding a simple space), so that effort might
rather be invested in fixing more important issues.
However, we might keep this in mind for when we run out of things that
need fixing...
-- F.
Thanks Martin.
The URL doesn't work though; here's the proper one:
http://tinyurl.com/2qg635
(http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/19b3d75214600926)
-- F.
While we're at it; what about e-mail addresses? Shouldn't those be
transformed automatically as well, even without the "mailto:" prefix?
(This might be slightly off-topic, but it's probably not worth starting
a new thread for... )
-- F.