Skip to content

Commit

Permalink
Switch to decodeURI
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Apr 4, 2019
1 parent c6bd0fa commit 5baa557
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/nohost-sw.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function serverInstall() {
console.log('Server installed for first time');

const fs = window.Filer.fs;
fs.writeFile('/hello world.txt', 'hello world!', function(err) {
fs.writeFile('/The Bridge.txt', 'hello world!', function(err) {
if(err) console.error(err);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/nohost-sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ workbox.routing.registerRoute(
// Pull the filesystem path off the url
let path = url.pathname.match(wwwRegex)[1];
// Deal with encoding in the filename (e.g., spaces as %20)
path = decodeURIComponent(path);
path = decodeURI(path);

// Allow passing `?json` on URL to get back JSON vs. raw response
const formatter =
Expand Down

0 comments on commit 5baa557

Please sign in to comment.