View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017176 | mantisbt | html | public | 2014-04-09 08:28 | 2019-09-18 03:46 |
Reporter | kelson | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.17 | ||||
Target Version | 1.3.0-beta.1 | Fixed in Version | 1.3.0-beta.1 | ||
Summary | 0017176: Add the possibility to define the x-ua-compatible meta | ||||
Description | Hi, With Internet Explorer 8, without any forcing meta, the compactibility mode is IE7. I have check on the Internet, the following line have to be coded after the Doctype. Regards, | ||||
Additional Information | My proposal: In html_api.php, add an event after the doctype function html_begin() { In the events_inc.php, define the new event constant | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
I am not sure I understand the rationale of defining a new event for this, surely you'll want the compatibility mode to apply to all of your pages consistently, not just some plugin's ? In this case I believe it would be simpler and make more sense to simply have a custom php script to define your meta tag as appropriate, and then include it on every Mantis page using the $g_meta_include_file config_inc.php setting. |
|
Actually I made a mystake by writting :
<meta http-equiv="X-UA-Compatible" content="IE=8"> has to be the first element right after <head>. function html_page_top1( $p_page_title = null ) { $g_meta_include_file is called too late. In order to work, include( config_get( 'meta_include_file' ) ) has to be after hmtl_head_begin() |
|
I assume you mean this: "The X-UA-Compatible header [...] must appear in the header of the webpage (the HEAD section) before all other elements except for the title element and other meta elements." (source [1]) Please test the proposed patch [2], let me know if that works with a custom $g_meta_include_file. Note that it's against master branch and may not apply cleanly on 1.2.x but the changes are quite straightforward so you should be able to figure conflicts out if you don't want to test on master. [1] http://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx |
|
I have applied changes in html_page_top1 function from your branch. I made 2 screenshots to show the result in my case. |
|
Pull request for peer review https://github.com/mantisbt/mantisbt/pull/158 Thanks for testing ! |
|
MantisBT: master 5299ddfd 2014-04-11 02:00 Details Diff |
HTML API: revise order of elements in HEAD section The HTML specification [1] does not specify a strict order for the elements within the HEAD section, other than Content-Type appearing within the first 1024 bytes of the document. Microsoft / Internet Explorer has stricter guidelines when it comes to defining compatibility mode [2]: "The X-UA-Compatible header [...] must appear in the header of the webpage (the HEAD section) before all other elements except for the title element and other meta elements." This commit reorganizes html_page_top1() function to: - define Content-Type as the HEAD's first element - allow users to set X-UA-Compatible in $g_meta_include_file - include CSS after defining the TITLE, together with other LINK tags Fixes 0017176 [1] http://www.w3.org/TR/html5/document-metadata.html [2] http://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx |
Affected Issues 0017176 |
|
mod - core/html_api.php | Diff File |