4 Aug
2022
4 Aug
'22
6:40 p.m.
Jacek Caban (@jacek) commented about dlls/mshtml/nsembed.c:
BOOL is_gecko_path(const char *path) { - WCHAR *buf, *ptr; + char unescaped_path[INTERNET_MAX_URL_LENGTH], *ptr; + WCHAR *buf; BOOL ret;
- buf = heap_strdupUtoW(path); - if(!buf || lstrlenW(buf) < gecko_path_len) - return FALSE; - - for(ptr = buf; *ptr; ptr++) { + strcpy(unescaped_path, path); + UrlUnescapeA(unescaped_path, NULL, NULL, URL_UNESCAPE_INPLACE);
I think that path is in UTF8 (unless it's specified otherwise by NewURI caller; we don't handle that yet, but I think Gecko doesn't use it another way anyway), while UrlUnescapeA will use CP_ACP. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/585#note_5684