Apricot icon indicating copy to clipboard operation
Apricot copied to clipboard

Relative URLs that don't begin with a "/" replaced incorrectly

Open aravindet opened this issue 12 years ago • 0 comments

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.

aravindet avatar May 18 '12 03:05 aravindet