Open codeclown opened 5 years ago
Background:
Since PR https://github.com/remy/inliner/pull/103 URLs are passed through encodeURI in get.js:
encodeURI
https://github.com/remy/inliner/blob/df3619f89b5b4b76bd1b1bca675a58b38bf7a5b7/lib/get.js#L74
Problem:
This can result in 404s for otherwise working URLs. Example:
<img src="http://example.com/img/ExampleImage%20Space.png" />
Passing it through encodeURI turns the encoded space character %20 into %2520:
%20
%2520
encodeURI('http://example.com/img/ExampleImage%20Space.png') "http://example.com/img/ExampleImage%2520Space.png"
Which breaks the URL, and now we get a 404 for the image when trying to inline it.
PR made: https://github.com/remy/inliner/pull/192
Anyone bumping into this issue could use my branch for the time being:
yarn add https://github.com/codeclown/inliner.git#encoded-space
Background:
Since PR https://github.com/remy/inliner/pull/103 URLs are passed through
encodeURI
in get.js:https://github.com/remy/inliner/blob/df3619f89b5b4b76bd1b1bca675a58b38bf7a5b7/lib/get.js#L74
Problem:
This can result in 404s for otherwise working URLs. Example:
Passing it through
encodeURI
turns the encoded space character%20
into%2520
:Which breaks the URL, and now we get a 404 for the image when trying to inline it.