Skip to content

Commit

Permalink
changed source check to match a url
Browse files Browse the repository at this point in the history
  • Loading branch information
akaunderr committed Jan 10, 2024
1 parent 78fd0af commit e19d221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ShrinkWrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ private function minRefByType(string $type = 'js'): void {
$fname = $e->getAttribute($attr);

if (filter_var($fname, FILTER_VALIDATE_URL)) continue;
$parsed_url = parse_url($fname);
if (isset($parsed_url['scheme']) || isset($parsed_url['host'])) continue;
if (parse_url($fname, PHP_URL_HOST)) continue;

if (!is_file($fname)) continue;

if ($this->doLog) {
Expand Down

0 comments on commit e19d221

Please sign in to comment.