Permalink
Browse files

Add credits, and a "decode" function.

  • Loading branch information...
1 parent 2f9722c commit 4a615ddd9c29b57dd5b526b46dcbcf4585acd95f isaacs committed with ry Dec 11, 2009
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/uri.js
View
@@ -3,11 +3,27 @@
* A URI parser, compliant with assorted RFCs, providing parsing and resolution utilities.
**/
+/*
+Blatantly stolen with permission from Narwhal, which did the same from Chiron,
+and bits taken from parseUri 1.2.1 (c) 2007 Steven Levithan <stevenlevithan.com> MIT License,
+and probably also plagiarizing http://code.google.com/p/js-uri/ in some ways.
+Most lines have been changed, please don't blame any of the above persons for
+any errors in this file.
+
+*/
+
exports.parse = uri_parse;
exports.format = uri_format;
exports.resolve = uri_resolve;
exports.resolveObject = uri_resolveObject;
+exports.decode = uri_decode;
+/****
+Decode a URI, replacing + with space
+*/
+function uri_decode (s) {
+ return decodeURIComponent(s.replace(/\+/g, ' '));
+}
/**** expressionKeys
members of a parsed URI object that you get

0 comments on commit 4a615dd

Please sign in to comment.