agourlay / post-on-my-fridge

Fun content platform built with Akka and Ember.js
Apache License 2.0
21 stars 4 forks source link

Refactor url parsing. #83

Closed agourlay closed 11 years ago

agourlay commented 12 years ago

Remove the ugly (and buggy) regular expressions and use an url parser to work with urls in content. Such as https://github.com/allmarkedup/jQuery-URL-Parser.

E.g : var url = $.url('http://allmarkedup.com/folder/dir/index.html?item=value'); url.attr('protocol'); // returns 'http' url.attr('path'); // returns '/folder/dir/index.html' url.attr('host'); // returns 'allmarkedup.com' etc...