Fixed Issue with title conversion and email address in url path

refael

Well-known member
Posting a link that contains email address in the path will incorrectly add EMAIL bbcodes to the url.

I created a path to demonstrate the issue.
Post the following url
Code:
http://rellect.com/k@k.com

The result is
Code:
<a href="http://rellect.com/[email]k@k.com[/email]" target="_blank" class="externalLink ProxyLink" data-proxy-href="proxy.php?link=http%3A%2F%2Frellect.com%2F%5Bemail%5Dk%40k.com%5B%2Femail%5D&amp;hash=5f8b4eeb31273e411ecad3c40d7deb17" rel="nofollow">rellect</a>

And if you wonder why someone would post such a link, it sometimes used for search
Code:
http://www.test.com/search=asdasd@gmail.com
 
It might be something we can workaround anyway, we'd have to have a look. But I believe it should be escaped. Problem is, browsers may display it unencoded and therefore users may copy paste it unencoded hence exasperating the problem.
 
I've tightened up the auto detection of emails to try to eliminate this. Essentially, an email will only be detected if there's a space or a form of quote before it. This eliminates ambiguity (for example, user:pass@example.com could actually be a URI rather than an email) and generally shouldn't prevent autolinking when expected (when typed with "normal" spacing).
 
Back
Top Bottom