From cad4fbfd3c6a03e6891efdf225438bf95cc31a92 Mon Sep 17 00:00:00 2001 From: Rodney Rehm Date: Sat, 8 Mar 2014 11:06:38 +0100 Subject: [PATCH] version bump to 1.12.1 --- README.md | 2 ++ URI.jquery.json | 2 +- bower.json | 2 +- build.js | 2 +- package.json | 2 +- src/IPv6.js | 2 +- src/SecondLevelDomains.js | 2 +- src/URI.js | 4 ++-- src/URI.min.js | 28 ++++++++++++++-------------- src/URITemplate.js | 2 +- src/jquery.URI.js | 2 +- src/jquery.URI.min.js | 2 +- 12 files changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 17ceb845..069122ed 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,8 @@ URI.js is published under the [MIT license](http://www.opensource.org/licenses/m ## Changelog ## +### 1.12.1 (March 8th 2014) ### + * fixing [`.encodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-encodeQuery) and [`.decodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-decodeQuery) to respect [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) - ([Issue #137](https://github.com/medialize/URI.js/issues/137)) * fixing fragment plugins to return URI for simpler loading - ([Issue #139](https://github.com/medialize/URI.js/issues/139)) diff --git a/URI.jquery.json b/URI.jquery.json index efd7959d..fc6fbb87 100644 --- a/URI.jquery.json +++ b/URI.jquery.json @@ -18,7 +18,7 @@ "URI-manipulation", "URL-manipulation" ], - "version": "1.12.0", + "version": "1.12.1", "author": { "name": "Rodney Rehm", "url": "http://rodneyrehm.de/en/" diff --git a/bower.json b/bower.json index e88690fd..f8c554c6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "URIjs", - "version": "1.12.0", + "version": "1.12.1", "main": [ "src/URI.js", "src/IPv6.js", diff --git a/build.js b/build.js index 4d0c859c..65fa9732 100644 --- a/build.js +++ b/build.js @@ -29,7 +29,7 @@ function build(files) { output_format: "text", output_info: "compiled_code" }, function(data) { - var code = "/*! URI.js v1.12.0 http://medialize.github.com/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data; + var code = "/*! URI.js v1.12.1 http://medialize.github.com/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data; $progress.hide(); $out.val(code).parent().show(); $out.prev().find('a').remove(); diff --git a/package.json b/package.json index 77fa0abb..6d9ed19c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "URIjs", - "version": "1.12.0", + "version": "1.12.1", "title": "URI.js - Mutating URLs", "author": { "name": "Rodney Rehm", diff --git a/src/IPv6.js b/src/IPv6.js index b118046e..58c02698 100644 --- a/src/IPv6.js +++ b/src/IPv6.js @@ -2,7 +2,7 @@ * URI.js - Mutating URLs * IPv6 Support * - * Version: 1.12.0 + * Version: 1.12.1 * * Author: Rodney Rehm * Web: http://medialize.github.com/URI.js/ diff --git a/src/SecondLevelDomains.js b/src/SecondLevelDomains.js index 1fe107bf..3de2bdd7 100644 --- a/src/SecondLevelDomains.js +++ b/src/SecondLevelDomains.js @@ -2,7 +2,7 @@ * URI.js - Mutating URLs * Second Level Domain (SLD) Support * - * Version: 1.12.0 + * Version: 1.12.1 * * Author: Rodney Rehm * Web: http://medialize.github.com/URI.js/ diff --git a/src/URI.js b/src/URI.js index 5866563e..4e1b7375 100644 --- a/src/URI.js +++ b/src/URI.js @@ -1,7 +1,7 @@ /*! * URI.js - Mutating URLs * - * Version: 1.12.0 + * Version: 1.12.1 * * Author: Rodney Rehm * Web: http://medialize.github.com/URI.js/ @@ -53,7 +53,7 @@ function URI(url, base) { return this; }; -URI.version = '1.12.0'; +URI.version = '1.12.1'; var p = URI.prototype; var hasOwn = Object.prototype.hasOwnProperty; diff --git a/src/URI.min.js b/src/URI.min.js index ebb8ddc9..7e256b90 100644 --- a/src/URI.min.js +++ b/src/URI.min.js @@ -1,4 +1,4 @@ -/*! URI.js v1.12.0 http://medialize.github.com/URI.js/ */ +/*! URI.js v1.12.1 http://medialize.github.com/URI.js/ */ /* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URITemplate.js */ (function(f,k){"object"===typeof exports?module.exports=k():"function"===typeof define&&define.amd?define(k):f.IPv6=k(f)})(this,function(f){var k=f&&f.IPv6;return{best:function(g){g=g.toLowerCase().split(":");var f=g.length,d=8;""===g[0]&&""===g[1]&&""===g[2]?(g.shift(),g.shift()):""===g[0]&&""===g[1]?g.shift():""===g[f-1]&&""===g[f-2]&&g.pop();f=g.length;-1!==g[f-1].indexOf(".")&&(d=7);var p;for(p=0;pk;k++)if("0"===f[0]&&1k&&(f=h,k=s)):"0"==g[p]&&(l=!0,h=p,s=1);s>k&&(f=h,k=s);1]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;d.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};d.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};d.invalid_hostname_characters= /[^a-zA-Z0-9\.-]/;d.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:d.domAttributes[b]}};d.encode=y;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=y;d.decode=decodeURIComponent};d.characters= {pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}};d.encodeQuery= -function(a,b){var c=d.encode(a+"");return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";try{return d.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}};d.recodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;bd)return a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(d)||"/"!==b.charAt(d))d=a.substring(0,d).lastIndexOf("/");return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var m=c.start||d.findUri.start,e=c.end||d.findUri.end,h=c.trim||d.findUri.trim,f=/[a-z0-9-]=["']?$/i;for(m.lastIndex=0;;){var l=m.exec(a);if(!l)break;l=l.index;if(c.ignoreHtml){var g=a.slice(Math.max(l-3,0), -l);if(g&&f.test(g))continue}var g=l+a.slice(l).search(e),n=a.slice(l,g).replace(h,"");c.ignore&&c.ignore.test(n)||(g=l+n.length,n=b(n,l,g,a),a=a.slice(0,l)+n+a.slice(g),m.lastIndex=l+n.length)}m.lastIndex=0;return a};d.ensureValidHostname=function(a){if(a.match(d.invalid_hostname_characters)){if(!f)throw new TypeError("Hostname '"+a+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(f.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError("Hostname '"+ +function(a,b){var c=d.encode(a+"");void 0===b&&(b=d.escapeQuerySpace);return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";void 0===b&&(b=d.escapeQuerySpace);try{return d.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}};d.recodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;bd)return a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(d)||"/"!==b.charAt(d))d=a.substring(0,d).lastIndexOf("/");return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var m=c.start||d.findUri.start,e=c.end||d.findUri.end,h=c.trim||d.findUri.trim,f=/[a-z0-9-]=["']?$/i;for(m.lastIndex=0;;){var l=m.exec(a);if(!l)break;l=l.index;if(c.ignoreHtml){var g= +a.slice(Math.max(l-3,0),l);if(g&&f.test(g))continue}var g=l+a.slice(l).search(e),n=a.slice(l,g).replace(h,"");c.ignore&&c.ignore.test(n)||(g=l+n.length,n=b(n,l,g,a),a=a.slice(0,l)+n+a.slice(g),m.lastIndex=l+n.length)}m.lastIndex=0;return a};d.ensureValidHostname=function(a){if(a.match(d.invalid_hostname_characters)){if(!f)throw new TypeError("Hostname '"+a+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(f.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError("Hostname '"+ a+"' contains characters other than [A-Z0-9.-]");}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},URITemplate&&"function"==typeof URITemplate.noConflict&&(a.URITemplate=URITemplate.noConflict()),k&&"function"==typeof k.noConflict&&(a.IPv6=k.noConflict()),SecondLevelDomains&&"function"==typeof SecondLevelDomains.noConflict&&(a.SecondLevelDomains=SecondLevelDomains.noConflict()),a;r.URI===this&&(r.URI=B);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0=== a||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new d(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};n={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"};t=function(a){return function(b,c){if(void 0===b)return this._parts[a]||"";this._parts[a]=b||null;this.build(!c);return this}};for(u in n)e[u]=t(n[u]);n={query:"?",fragment:"#"};t=function(a,b){return function(c, d){if(void 0===c)return this._parts[a]||"";null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!d);return this}};for(u in n)e[u]=t(u,n[u]);n={search:["?","query"],hash:["#","fragment"]};t=function(a,b){return function(c,d){var e=this[a](c,d);return"string"===typeof e&&e.length?b+e:e}};for(u in n)e[u]=t(n[u][1],n[u][0]);e.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?d.decodePath(c):c}this._parts.path=a?d.recodePath(a): diff --git a/src/URITemplate.js b/src/URITemplate.js index e824430c..9f099867 100644 --- a/src/URITemplate.js +++ b/src/URITemplate.js @@ -2,7 +2,7 @@ * URI.js - Mutating URLs * URI Template Support - http://tools.ietf.org/html/rfc6570 * - * Version: 1.12.0 + * Version: 1.12.1 * * Author: Rodney Rehm * Web: http://medialize.github.com/URI.js/ diff --git a/src/jquery.URI.js b/src/jquery.URI.js index 9c39f2ab..9f6a47ff 100644 --- a/src/jquery.URI.js +++ b/src/jquery.URI.js @@ -2,7 +2,7 @@ * URI.js - Mutating URLs * jQuery Plugin * - * Version: 1.12.0 + * Version: 1.12.1 * * Author: Rodney Rehm * Web: http://medialize.github.com/URI.js/jquery-uri-plugin.html diff --git a/src/jquery.URI.min.js b/src/jquery.URI.min.js index afbac823..06351c93 100644 --- a/src/jquery.URI.min.js +++ b/src/jquery.URI.min.js @@ -1,4 +1,4 @@ -/*! URI.js v1.12.0 http://medialize.github.com/URI.js/ */ +/*! URI.js v1.12.1 http://medialize.github.com/URI.js/ */ /* build contains: jquery.URI.js */ (function(d,e){"object"===typeof exports?module.exports=e(require("jquery","./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],e):e(d.jQuery,d.URI)})(this,function(d,e){function h(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function k(a){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}function p(a){return{get:function(b){return d(b).uri()[a]()},set:function(b,c){d(b).uri()[a](c);return c}}}function l(a,b){var c,e,f;if(!k(a)|| !b)return!1;c=b.match(q);if(!c||!c[5]&&":"!==c[2]&&!g[c[2]])return!1;f=d(a).uri();if(c[5])return f.is(c[5]);if(":"===c[2])return e=c[1].toLowerCase()+":",g[e]?g[e](f,c[4]):!1;e=c[1].toLowerCase();return m[e]?g[c[2]](f[e](),c[4],e):!1}var m={},g={"=":function(a,b){return a===b},"^=":function(a,b,c){return!!(a+"").match(RegExp("^"+h(b),"i"))},"$=":function(a,b,c){return!!(a+"").match(RegExp(h(b)+"$","i"))},"*=":function(a,b,c){"directory"==c&&(a+="/");return!!(a+"").match(RegExp(h(b),"i"))},"equals:":function(a,