function cleanUrl(url) {
    "use strict";
    if (url.toLowerCase().indexOf('http') !== 0) {
        return url;
    }
    var a = document.createElement('a');
    a.href = url;
    return a.href;
}
Cleans a passed URL.

@param  String  url An HTTP URL
@return String