Commit d2f5eaf9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Support semicolon in UA compatible string.

parent 36758fc7
......@@ -405,7 +405,7 @@ BOOL parse_compat_version(const WCHAR *version_string, compat_mode_t *r)
for(p = version_string; '0' <= *p && *p <= '9'; p++)
version = version * 10 + *p-'0';
if(*p || p == version_string)
if((*p && *p != ';') || p == version_string)
return FALSE;
switch(version){
......@@ -434,7 +434,7 @@ BOOL parse_compat_version(const WCHAR *version_string, compat_mode_t *r)
static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
{
static const WCHAR ie_eqW[] = {'I','E','='};
static const WCHAR edgeW[] = {'e','d','g','e',0};
static const WCHAR edgeW[] = {'e','d','g','e'};
TRACE("%s\n", debugstr_w(p));
......@@ -442,7 +442,10 @@ static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
return FALSE;
p += 3;
if(!wcsicmp(p, edgeW)) {
if(!wcsnicmp(p, edgeW, ARRAY_SIZE(edgeW))) {
p += ARRAY_SIZE(edgeW);
if(*p && *p != ';')
return FALSE;
*r = COMPAT_MODE_IE11;
return TRUE;
}
......
......@@ -3493,9 +3493,9 @@ static void run_js_tests(void)
run_script_as_http_with_mode("documentmode.js", "7", "7");
run_script_as_http_with_mode("documentmode.js", "8", "8");
run_script_as_http_with_mode("documentmode.js", "9", "9");
run_script_as_http_with_mode("documentmode.js", "10", "10");
run_script_as_http_with_mode("documentmode.js", "10", "10;abc");
run_script_as_http_with_mode("documentmode.js", "11", "11");
run_script_as_http_with_mode("documentmode.js", "11", "edge");
run_script_as_http_with_mode("documentmode.js", "11", "edge;123");
run_script_as_http_with_mode("asyncscriptload.js", NULL, "9");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment