Open pillsilly opened 2 years ago
Because ngx-filesaver
used of URL parsing, so you can use:
- const fileName = `save%.${type}`;
+ const fileName = encodeURI(`save%.${type}`);
to fixed this.
Because
ngx-filesaver
used of URL parsing, so you can use:- const fileName = `save%.${type}`; + const fileName = encodeURI(`save%.${type}`);
to fixed this.
Thanks for the hint,
what about including the encodeURI
work inside the lib so that to clients it'll be much more intuitive?
If it sounds ok then I am ok providing PR.
on https://stackblitz.com/edit/ngx-filesaver , it's reproducible if you add a
%
in line 56no error prompted, no uncaught exception, no nothing.
Also I tested the
FileSaver
implementation it's supported.