var fixedURL = URL.match(/^(.*:\/\/[^\/]+\/.*)@/);
fixedURL && (url = url.substring(0, fixedURL[1].length) + url.substring(fixedURL[1].length).replace(/@/g, "%40"));
It looks like:* fidexURL is whatever is after :// and up until the very last @ (greediness)
* the second line fixedURL && is going to complete if fixedURL is not undefined
* url = this fixedURL, then the rest of it where @ was replaced by %40
so basically, entering http://avlidienbrunn.se/@twitter.com/@hehe.php will give
url = avlidienbrunn.se/@twitter.com/%40hehe.php
if I understand correctly. What happens after?
EDIT: it must be that the last [^/.]* before @ is taken as the domain name. But why splitting the URL before a @ sign? I'm confused
No comments yet.