Apricot
Apricot copied to clipboard
Relative URLs that don't begin with a "/" replaced incorrectly
For a page with something like
<a href='abc.php'>
When I open it with the callback
doc.find("a").each(el) {
console.log(el.href)
}
it shows /home/me/project-path/node-modules/apricot/lib/abc.php. I'd expect just abc.php there, or that you'd resolve it relative to the URL I passed to Apricot.open().
Interestingly, URLs that begin with a "/" are left as they are and no attempt is made to add the domain etc.