Skip to content

Commit

Permalink
fixed bad closure compiler example, added todo
Browse files Browse the repository at this point in the history
  • Loading branch information
rodneyrehm committed Dec 28, 2011
1 parent f8bf98a commit 4f73a96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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==
```

Expand Down Expand Up @@ -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 ###

Expand Down
2 changes: 2 additions & 0 deletions src/URI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 4f73a96

Please sign in to comment.