Closed PavelFil closed 1 month ago
Hmmm, this is a very good catch!
I've tried to align hQuery to the browser and jQuery behavior in #48ad78:
$node->attr('href')
- always the raw value.$node->href
- always the evaluated/resolved value.This is a potentially breaking change for some code out there.
I've incremented the minor version, though strictly speaking should increase the major version. On the other hand it is no a big change, thus I'm hesitant to increase the major version.
This code:
returns:
So there is no way to receive raw
href
attribute. We must add$hQuery->baseURI(null);
after$hQuery = hQuery::fromHTML($html);
to prevent links modifying.I suspect, this is some old functional that can be removed.