Skip to content

Commit

Permalink
Revert "Doctype now lowercase as per hb5p."
Browse files Browse the repository at this point in the history
This reverts commit a2ef22b.

Lowercase 'doctype' is not valid XML.
  • Loading branch information
DavidOliver committed Aug 27, 2015
1 parent bc2bdc5 commit 4d2dc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function parse_html($context) {
$html_doctype = implode("\n", $html_array);

// Parse the doctype to convert XHTML syntax to HTML5
$html_doctype = preg_replace("/<!DOCTYPE [^>]+>/", "<!doctype html>", $html_doctype);
$html_doctype = preg_replace("/<!DOCTYPE [^>]+>/", "<!DOCTYPE html>", $html_doctype);
$html_doctype = preg_replace('/ xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"| xml:lang="[^\"]*\"/', '', $html_doctype);
$html_doctype = preg_replace('/<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=(.*[a-z0-9-])\"( \/)?>/i', '<meta charset="\1"\2>', $html_doctype);

Expand Down

0 comments on commit 4d2dc79

Please sign in to comment.