foreach ($entries as $entry) {
if ($entry->hasAttribute("href")) {
$entry->setAttribute("href",
- rewrite_relative_url($content_link, $entry->getAttribute("href")));
+ rewrite_relative_url($content_link->getAttribute("href"), $entry->getAttribute("href")));
}
if ($entry->hasAttribute("src")) {
$entry->setAttribute("src",
- rewrite_relative_url($content_link, $entry->getAttribute("src")));
+ rewrite_relative_url($content_link->getAttribute("href"), $entry->getAttribute("src")));
}