parseUrl fails when the url contains query
marcgeeklaberge opened this issue · comments
Any url containing a query (?) is currently failing in version 8.1.0.
const link = 'https://www.google.ca/search?q=hello;
try {
const parsedUrl = parseUrl(link);
console.log('parseUrl no problem', parsedUrl);
} catch (error) {
console.log('parseUrl problem', JSON.stringify(error));
}
LOG parseUrl problem {"subject_url":"https://www.google.ca/search?q=hello"}
in version 8.1.0
LOG parseUrl no problem {"hash": "", "host": "www.google.ca", "href": "https://www.google.ca/search?q=hello", "parse_failed": false, "password": "", "pathname": "/search", "port": "", "protocol": "ssh", "protocols": ["ssh"], "query": {}, "resource": "www.google.ca", "search": "", "user": "git"}
in version 8.0.0
Any plan to fix that?
Hello Maintainers , Can I work on this issue ?
This was fixed I think:
{
protocols: [ 'https' ],
protocol: 'https',
port: '',
resource: 'www.google.ca',
host: 'www.google.ca',
user: '',
password: '',
pathname: '/search',
hash: '',
search: 'q=hello',
href: 'https://www.google.ca/search?q=hello',
query: { q: 'hello' },
parse_failed: false
}