Skip to content

Commit

Permalink
Use \s character class, line breaks are valid as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cyMarvin committed Oct 2, 2023
1 parent 7c69864 commit 77b8612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/ResourceMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public function match(string $input): array
*/
protected function getPattern(): string
{
return '/<script[\/\s\w\-="]* src=' . $this->resourcePattern . '[^>]*>'
return '/<script[\/\s\w\-="]*[\s]+src=' . $this->resourcePattern . '[^>]*>'
. '|' .
'<link[\/\s\w\-="]* href=' . $this->resourcePattern . '[^>]*>'
'<link[\/\s\w\-="]*[\s]+href=' . $this->resourcePattern . '[^>]*>'
. '/ui';
}
}

0 comments on commit 77b8612

Please sign in to comment.