Skip to content

Commit d21b0e1

Browse files
committed
Slightly loosen urlRegexp
urlRegexp was requiring that there be no spaces in the path component of the URL. However, this is overly strict; and in particular webpack creates URLs with an embedded space. Fixes mozilla#267
1 parent c898668 commit d21b0e1

14 files changed

+74
-30
lines changed

dist/source-map.debug.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/source-map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ return /******/ (function(modules) { // webpackBootstrap
746746
}
747747
exports.getArg = getArg;
748748

749-
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(\S*)$/;
749+
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
750750
var dataUrlRegexp = /^data:.+\,.+$/;
751751

752752
function urlParse(aUrl) {
@@ -902,7 +902,7 @@ return /******/ (function(modules) { // webpackBootstrap
902902
exports.join = join;
903903

904904
exports.isAbsolute = function (aPath) {
905-
return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
905+
return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
906906
};
907907

908908
/**

dist/source-map.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/source-map.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_api.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_array_set.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_dog_fooding.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_source_map_consumer.js

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_source_map_generator.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/test_source_node.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)