Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

PhantomJS: URL encoding #84

Open
Octane opened this issue Jan 13, 2016 · 2 comments
Open

PhantomJS: URL encoding #84

Octane opened this issue Jan 13, 2016 · 2 comments

Comments

@Octane
Copy link

Octane commented Jan 13, 2016

The url.js returns different results in the browser and PhantomJS.

Test case

var url = new URL('https://site.com/%D1%87%D1%82%D0%BE-%D0%BD%D0%B8%D0%B1%D1%83%D0%B4%D1%8C/');

console.log(url.pathname);

Results

PhantomJS 1.9.8
/что-нибудь/

IE9, Opera 12.17
/%D1%87%D1%82%D0%BE-%D0%BD%D0%B8%D0%B1%D1%83%D0%B4%D1%8C/

Chrome 49, Firefox 45
/%D1%87%D1%82%D0%BE-%D0%BD%D0%B8%D0%B1%D1%83%D0%B4%D1%8C/
@inexorabletash
Copy link
Owner

The URL polyfill delegates to the native implementation of an anchor ("A") element if URL isn't present. So that would indicate that PhantomJS's implementation is buggy. Can you repro with just that, and file a bug against it if so?

(I don't consider it a priority for this library to paper over every single implementation bug, especially for non-browser use cases.)

@inexorabletash
Copy link
Owner

And getting it fixed in PhantomJS would also enable Travis-CI testing, if someone wants to learn me some of that...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants