Skip to content

Commit

Permalink
Fix comment typo in AMP_Theme_Support::prepare_response()
Browse files Browse the repository at this point in the history
Co-Authored-By: Alain Schlesser <[email protected]>
  • Loading branch information
westonruter and schlessera authored Aug 30, 2019
1 parent 4a2d8ad commit 820fbda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ public static function prepare_response( $response, $args = [] ) {

/*
* Abort if the response was not HTML. To be post-processed as an AMP page, the output-buffered document must
* have the HTML mime type and it must start <html> followed by <head> tag (with whitespace, doctype, and comments optionally interspersed).
* have the HTML mime type and it must start with <html> followed by <head> tag (with whitespace, doctype, and comments optionally interspersed).
*/
if ( 'text/html' !== substr( AMP_HTTP::get_response_content_type(), 0, 9 ) || ! preg_match( '#^(?:<!.*?>|\s+)*<html.*?>(?:<!.*?>|\s+)*<head\b(.*?)>#is', $response ) ) {
return $response;
Expand Down

0 comments on commit 820fbda

Please sign in to comment.