compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
$links = array();
foreach($htmlLinks as $link) {
$link = \Zend\Uri\UriFactory::factory($link, $baseUrl->getScheme());
if ($link instanceof \Zend\Uri\Http) {
$scheme = \Zend\Uri\Uri::parseScheme($link);
if ($scheme == 'http' || $scheme == 'https' || $scheme === null) {
try {
$url = new \Zend\Uri\Http($link);
$links[] = $link->resolve($baseUrl)->normalize(); $url->resolve($baseUrl)->normalize();
} catch (\Zend\Uri\InvalidUriException $ex) {
// Deal with invalid / malformed URI
}
}
}