Open delamotte-pierrick opened 1 year ago
Hello Pierrick,
Thank you for your PR and an interesting discovery!
For tests, I usually 'mock up' a small HTML page and add it to this test pages repo. This way the hosted examples remain in control and won't change unexpectedly. Could you prepare such a test page and tweak the test?
Let me know if any questions come up :)
Peter
Hey Peter,
I have added the file and maded the pull request here.
I'm not sure if the domain https://test-pages.phpscraper.de
is the good one for the test, so just tell me if I need to change them
Have a nice day ! Pierrick
Hello Pierrick,
Thank you for the PR!
The host should be okay, no?
According to Mozilla relative paths are valid. I was wondering if we should return an absolute URL. Should we rename the tests accordingly and make sure it returns the absolute PATH (even if relative is provided)? PHPScraper returns absolute URLs for anything, even if relative paths are provided.
Cheers, Peter
Add test and bugfix in case the href content of 'base' tag is a relative url.
The bug have been encounter on the url : https://www.gla.ac.uk/myglasgow/digitalaccessibility/
the current base tag contain :
<base href="/myglasgow/digitalaccessibility/" />
Stack Trace and error message:
Is that possible for you to generate an url with an invalid base tag, that i can use instead of those of Glasgow University, please ?
Regards, Pierrick