diff --git a/README.md b/README.md index e911d035..4bea55cf 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,9 @@ use [Google Closure Compiler](http://closure-compiler.appspot.com/home): // ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS // @output_file_name contextMenu.js -// @code_url http://medialize.github.com/URI.js/IPv6.js -// @code_url http://medialize.github.com/URI.js/punycode.js -// @code_url http://medialize.github.com/URI.js/URI.js +// @code_url http://medialize.github.com/URI.js/src/IPv6.js +// @code_url http://medialize.github.com/URI.js/src/punycode.js +// @code_url http://medialize.github.com/URI.js/src/URI.js // ==/ClosureCompiler== ``` @@ -105,6 +105,9 @@ Docs where you get more info on parsing and working with URLs * [URI Parser](http://blog.stevenlevithan.com/archives/parseuri) * [jQuery-URL-Parser](https://github.com/allmarkedup/jQuery-URL-Parser) * [URL.js](https://github.com/ericf/urljs) +* [furl (Python)](https://github.com/gruns/furl) + +[Discussion on Hacker News](https://news.ycombinator.com/item?id=3398837) ### URL Draft ### diff --git a/src/URI.js b/src/URI.js index f5a59a2f..39e583ff 100644 --- a/src/URI.js +++ b/src/URI.js @@ -423,6 +423,7 @@ p.pathname = function(v, build) { if (v === undefined) { return this._parts.path || "/"; } else { + // TODO: escape path segments this._parts.path = v || "/"; build !== false && this.build(); return this; @@ -728,6 +729,7 @@ p.removeSearch = p.removeQuery; // TODO: normalize protocol to lower case // TODO: normalize hostname to lower case (IPv6 to upper?) // TODO: normalize pathname elements: /%7Esmith/home.html -> /~smith/home.html +// TODO: add URI.inString(string, callback) using gruber revised http://rodneyrehm.de/t/url-regex.html // sanitizing URLs p.normalize = function() {