mirror of
https://github.com/postlight/mercury-parser
synced 2024-11-17 03:25:31 +00:00
fix: encodeURI before fetching
This commit is contained in:
parent
1343469b6c
commit
4cdc4165d6
@ -76,13 +76,13 @@ export function baseDomain({ host }) {
|
||||
// unicode content for HTML, with charset conversion.
|
||||
|
||||
export default async function fetchResource(url) {
|
||||
const parsedUrl = URL.parse(url);
|
||||
const parsedUrl = URL.parse(encodeURI(url));
|
||||
|
||||
const options = {
|
||||
url: parsedUrl,
|
||||
headers: { ...REQUEST_HEADERS },
|
||||
timeout: FETCH_TIMEOUT,
|
||||
// Don't set encoding; this fixes issues
|
||||
// Don't set encoding; fixes issues
|
||||
// w/gzipped responses
|
||||
encoding: null,
|
||||
// Accept cookies
|
||||
|
Loading…
Reference in New Issue
Block a user