-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #813 from Stuk/santize-loaded-filenames
v3.8.0 Santize loaded filenames
- Loading branch information
Showing
12 changed files
with
135 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "jszip", | ||
"version": "3.7.1", | ||
"version": "3.8.0", | ||
"author": "Stuart Knightley <[email protected]>", | ||
"description": "Create, read and edit .zip files with JavaScript http://stuartk.com/jszip", | ||
"scripts": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* global QUnit,JSZip,JSZipTestUtils */ | ||
'use strict'; | ||
|
||
// These tests only run in Node | ||
var utils = require("../../lib/utils"); | ||
|
||
QUnit.module("utils"); | ||
|
||
QUnit.test("Paths are resolved correctly", function (assert) { | ||
// Backslashes can be part of filenames | ||
assert.strictEqual(utils.resolve("root\\a\\b"), "root\\a\\b"); | ||
assert.strictEqual(utils.resolve("root/a/b"), "root/a/b"); | ||
assert.strictEqual(utils.resolve("root/a/.."), "root"); | ||
assert.strictEqual(utils.resolve("root/a/../b"), "root/b"); | ||
assert.strictEqual(utils.resolve("root/a/./b"), "root/a/b"); | ||
assert.strictEqual(utils.resolve("root/../../../"), ""); | ||
assert.strictEqual(utils.resolve("////"), "/"); | ||
assert.strictEqual(utils.resolve("/a/b/c"), "/a/b/c"); | ||
assert.strictEqual(utils.resolve("a/b/c/"), "a/b/c/"); | ||
assert.strictEqual(utils.resolve("../../../../../a"), "a"); | ||
assert.strictEqual(utils.resolve("../app.js"), "app.js"); | ||
}); |