Javascript String urlify()
urlify()
String.prototype.urlify = function() { return this.trim().split(' ').join('%20'); }
String.prototype.urlify = function() { return this.split(' ').reverse().trimSide().reverse().trimSide().join('%20'); }