Handle edge case: "invalid url in base tag"#179
Conversation
|
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 Have a nice day ! |
|
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, |
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