Skip to content

Commit

Permalink
MDLSITE-5739 mustache_lint: Add lang attribute to wrapper.
Browse files Browse the repository at this point in the history
Validator v18.11.5 complains about it (info notice), and in fact,
having lang attribute seems a good practice these days:
https://www.w3.org/International/questions/qa-html-language-declarations#quickanswer
  • Loading branch information
kabalin committed May 1, 2019
1 parent 5ae7ee8 commit 1f3f3e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mustache_lint/mustache_lint.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function check_html_validation($content) {
if (strpos($content, '<head>') === false) {
// Primative detection if we have full html body, if not, wrap it.
// (This isn't bulletproof, obviously).
$wrappedcontent = "<!DOCTYPE html><head><title>Validate</title></head><body>\n{$content}\n</body></html>";
$wrappedcontent = "<!DOCTYPE html><html lang=\"en\"><head><title>Validate</title></head><body>\n{$content}\n</body></html>";
} else {
$wrappedcontent = $content;
}
Expand Down

0 comments on commit 1f3f3e8

Please sign in to comment.