Skip to content

Commit

Permalink
fixing unsafe eval by using UMD's root - closes #105
Browse files Browse the repository at this point in the history
  • Loading branch information
rodneyrehm committed Aug 12, 2013
1 parent 27b8cfa commit b491e41
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 20 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ URI.js is published under the [MIT license](http://www.opensource.org/licenses/m
### `[dev-version]` (master branch) ###

* 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))
* fixing unsafe eval by using UMD's root - ([Issue #105](https://github.com/medialize/URI.js/issues/105))

### 1.11.0 (August 6th 2013) ###

Expand Down
7 changes: 2 additions & 5 deletions src/IPv6.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
define(factory);
} else {
// Browser globals (root is window)
root.IPv6 = factory();
root.IPv6 = factory(root);
}
}(this, function () {
}(this, function (root) {
"use strict";

/*
Expand All @@ -35,9 +35,6 @@ var _expected = "fe80::204:61ff:fe9d:f156";
console.log(_in, _out, _expected, _out === _expected);
*/

// get access to the global object ('window' in browsers)
var root = (function(f){ return f('return this')(); })(Function);

// save current IPv6 variable, if any
var _IPv6 = root.IPv6;

Expand Down
7 changes: 2 additions & 5 deletions src/SecondLevelDomains.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@
define(factory);
} else {
// Browser globals (root is window)
root.SecondLevelDomains = factory();
root.SecondLevelDomains = factory(root);
}
}(this, function () {
}(this, function (root) {
"use strict";

// get access to the global object ('window' in browsers)
var root = (function(f){ return f('return this')(); })(Function);

// save current SecondLevelDomains variable, if any
var _SecondLevelDomains = root.SecondLevelDomains;

Expand Down
7 changes: 2 additions & 5 deletions src/URI.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
define(['./punycode', './IPv6', './SecondLevelDomains'], factory);
} else {
// Browser globals (root is window)
root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains);
root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);
}
}(this, function (punycode, IPv6, SLD) {
}(this, function (punycode, IPv6, SLD, root) {
"use strict";

// get access to the global object ('window' in browsers)
var root = (function(f){ return f('return this')(); })(Function);

// save current URI variable, if any
var _URI = root.URI;

Expand Down
7 changes: 2 additions & 5 deletions src/URITemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@
define(['./URI'], factory);
} else {
// Browser globals (root is window)
root.URITemplate = factory(root.URI);
root.URITemplate = factory(root.URI, root);
}
}(this, function (URI) {
}(this, function (URI, root) {
"use strict";

// get access to the global object ('window' in browsers)
var root = (function(f){ return f('return this')(); })(Function);

// save current URITemplate variable, if any
var _URITemplate = root.URITemplate;

Expand Down

0 comments on commit b491e41

Please sign in to comment.