Skip to content

InsertDNSPrefetch with head attributes #80

@jamesliu78

Description

@jamesliu78

Some time head will have attributes.
https://developers.facebook.com/docs/reference/opengraph/object-type/article/

         })->unique()->implode("\n");
 
         $replace = [
-            '#<head>(.*?)#' => "<head>\n{$dnsPrefetch}"
+            '#<head[^>]*>(.*?)#' => "<head>\n{$dnsPrefetch}"
         ];
 
         return $this->replace($replace, $buffer);

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions