Skip to content

Commit

Permalink
Merge pull request #35 from gjportegies/match-single-quote-metatag
Browse files Browse the repository at this point in the history
Match meta tag for single quotes, often used by Wordpress sites
  • Loading branch information
freekmurze authored May 18, 2022
2 parents 61a5143 + 75d1094 commit f40a12b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RobotsMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function findRobotsMetaTagProperties(string $html): array

protected function findRobotsMetaTagLine(string $html): ?string
{
if (preg_match('/\<meta name="robots".*?\>/mis', $html, $matches)) {
if (preg_match('/\<meta name=("|\')robots("|\').*?\>/mis', $html, $matches)) {
return $matches[0];
}

Expand Down

0 comments on commit f40a12b

Please sign in to comment.