Skip to content

Commit 2bdf950

Browse files
committed
version bump
2 parents fa3617c + 95c6147 commit 2bdf950

File tree

13 files changed

+160
-105
lines changed

13 files changed

+160
-105
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ URI.js is published under the [MIT license](http://www.opensource.org/licenses/m
223223

224224
## Changelog ##
225225

226+
### 1.11.2 (August 14th 2013) ###
227+
228+
* fixing regression for Node.js introduced by `fixing unsafe eval by using UMD's root` - ([Issue #107](https://github.com/medialize/URI.js/issues/107))
229+
* fixing parser to accept malformed userinfo (non-encoded email address) - ([Issue #108](https://github.com/medialize/URI.js/issues/108))
230+
226231
### 1.11.1 (August 13th 2013) ###
227232

228233
* fixing inconsistent [`.relativeTo()`](http://medialize.github.com/URI.js/docs.html#relativeto) results caused by inconsistent URI component handling - ([Issue #103](https://github.com/medialize/URI.js/issues/103))

URI.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"URI-manipulation",
1919
"URL-manipulation"
2020
],
21-
"version": "1.11.1",
21+
"version": "1.11.2",
2222
"author": {
2323
"name": "Rodney Rehm",
2424
"url": "http://rodneyrehm.de/en/"

build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function build(files) {
2929
output_format: "text",
3030
output_info: "compiled_code"
3131
}, function(data) {
32-
var code = "/*! URI.js v1.11.1 http://medialize.github.com/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
32+
var code = "/*! URI.js v1.11.2 http://medialize.github.com/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
3333
$progress.hide();
3434
$out.val(code).parent().show();
3535
$out.prev().find('a').remove();

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "URIjs",
3-
"version": "1.11.1",
3+
"version": "1.11.2",
44
"main": [
55
"src/URI.js",
66
"src/IPv6.js",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "URIjs",
3-
"version": "1.11.1",
3+
"version": "1.11.2",
44
"title": "URI.js - Mutating URLs",
55
"author": {
66
"name": "Rodney Rehm",

src/IPv6.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* IPv6 Support
44
*
5-
* Version: 1.11.1
5+
* Version: 1.11.2
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.com/URI.js/
@@ -36,7 +36,7 @@ console.log(_in, _out, _expected, _out === _expected);
3636
*/
3737

3838
// save current IPv6 variable, if any
39-
var _IPv6 = root.IPv6;
39+
var _IPv6 = root && root.IPv6;
4040

4141
function best(address) {
4242
// based on:
@@ -171,10 +171,11 @@ function best(address) {
171171
};
172172

173173
function noConflict(){
174-
if (root.IPv6 === this) {
175-
root.IPv6 = _IPv6;
176-
}
177-
return this;
174+
if (root.IPv6 === this) {
175+
root.IPv6 = _IPv6;
176+
}
177+
178+
return this;
178179
};
179180

180181
return {

src/SecondLevelDomains.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* Second Level Domain (SLD) Support
44
*
5-
* Version: 1.11.1
5+
* Version: 1.11.2
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.com/URI.js/
@@ -29,7 +29,7 @@
2929
"use strict";
3030

3131
// save current SecondLevelDomains variable, if any
32-
var _SecondLevelDomains = root.SecondLevelDomains;
32+
var _SecondLevelDomains = root && root.SecondLevelDomains;
3333

3434
var hasOwn = Object.prototype.hasOwnProperty;
3535
var SLD = {

src/URI.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* URI.js - Mutating URLs
33
*
4-
* Version: 1.11.1
4+
* Version: 1.11.2
55
*
66
* Author: Rodney Rehm
77
* Web: http://medialize.github.com/URI.js/
@@ -27,7 +27,7 @@
2727
"use strict";
2828

2929
// save current URI variable, if any
30-
var _URI = root.URI;
30+
var _URI = root && root.URI;
3131

3232
function URI(url, base) {
3333
// Allow instantiation without the 'new' keyword
@@ -451,8 +451,10 @@ URI.parseAuthority = function(string, parts) {
451451
};
452452
URI.parseUserinfo = function(string, parts) {
453453
// extract username:password
454-
var pos = string.indexOf('@');
455454
var firstSlash = string.indexOf('/');
455+
var pos = firstSlash > -1
456+
? string.lastIndexOf('@', firstSlash)
457+
: string.indexOf('@');
456458
var t;
457459

458460
// authority@ must come before /path
@@ -781,30 +783,29 @@ URI.ensureValidHostname = function(v) {
781783

782784
// noConflict
783785
URI.noConflict = function(removeAll) {
784-
if(removeAll){
785-
var unconflicted = {
786-
URI: this.noConflict()
787-
};
786+
if (removeAll) {
787+
var unconflicted = {
788+
URI: this.noConflict()
789+
};
788790

789-
if(URITemplate && typeof URITemplate.noConflict == "function") {
790-
unconflicted.URITemplate = URITemplate.noConflict();
791-
}
792-
if(IPv6 && typeof IPv6.noConflict == "function") {
793-
unconflicted.IPv6 = IPv6.noConflict();
794-
}
795-
if(SecondLevelDomains && typeof SecondLevelDomains.noConflict == "function") {
796-
unconflicted.SecondLevelDomains = SecondLevelDomains.noConflict();
797-
}
791+
if (URITemplate && typeof URITemplate.noConflict == "function") {
792+
unconflicted.URITemplate = URITemplate.noConflict();
793+
}
794+
795+
if (IPv6 && typeof IPv6.noConflict == "function") {
796+
unconflicted.IPv6 = IPv6.noConflict();
797+
}
798+
799+
if (SecondLevelDomains && typeof SecondLevelDomains.noConflict == "function") {
800+
unconflicted.SecondLevelDomains = SecondLevelDomains.noConflict();
801+
}
798802

799-
return unconflicted;
800-
}
801-
else {
802-
if (root.URI === this) {
803-
root.URI = _URI;
803+
return unconflicted;
804+
} else if (root.URI === this) {
805+
root.URI = _URI;
804806
}
805807

806808
return this;
807-
}
808809
};
809810

810811
p.build = function(deferBuild) {

0 commit comments

Comments
 (0)