The X-UA-Compatible http-equiv meta tag added by advagg_preprocess_html() method fails to validate in W3C validator.
If you're looking to make it technically valid (everyone loves to see the green favicon) w/o effecting any functionality, you should be able to just wrap it in a "if IE" tag.
The meta_ie_render_engine should be modified to add prefix and suffix as below
// Setup IE meta tag to force IE rendering mode.
$meta_ie_render_engine = array(
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
'http-equiv' => 'X-UA-Compatible',
'content' => 'IE=edge,chrome=1',
),
'#weight' => '-99999',
'#prefix' => '<!--[if IE]>',
'#suffix' => '<![endif]-->',
);
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | advagg-2136475-w3c-validation.patch | 796 bytes | mikeytown2 |
| #4 | advagg-2136475-ie-conditional-w3c-validate-html-4.patch | 484 bytes | yannisc |
| #1 | advagg-2136475-ie-conditional-w3c-validate-html.patch | 364 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedThanks for the tip :)
Following patch has been committed.
Comment #3
yannisc commentedWhen the W3c validator checks URL reports this as incompatible even if it's inside the IE conditional. When check is done through the direct input option it doesn't report an error though.
So, since Chrome frame is retired, I would suggest to remove the chrome=1 part.
Comment #4
yannisc commentedI attach a patch that removes the chrome=1 part and since it is valid, the IE conditionals as well.
Comment #5
mikeytown2 commentedIt's still out there in the wild; thinking I'll use a header
http://www.validatethis.co.uk/news/fix-bad-value-x-ua-compatible-once-an...
header('X-UA-Compatible: IE=edge,chrome=1');Comment #6
mikeytown2 commentedheader in patch form
Comment #8
mikeytown2 commented#6 has been committed