This PR fixes a bug in the HTTP driver that was using the wrong <link> tag while parsing the HTML.
This bug happened if there were multiple <link> tags on the same line in the HTML. The preg_match function was grabbing the entire line and then we were returning the first link in the matches. So, this would return whichever link element was the first on the line.
Now, the code will explode the line and loop through the links to find the "icon" or "shortcut icon" element.
This PR fixes a bug in the HTTP driver that was using the wrong
<link>
tag while parsing the HTML.This bug happened if there were multiple
<link>
tags on the same line in the HTML. Thepreg_match
function was grabbing the entire line and then we were returning the first link in the matches. So, this would return whichever link element was the first on the line.Now, the code will explode the line and loop through the links to find the "icon" or "shortcut icon" element.