WebView: detect websites without body and html by head tag

git-svn-id: svn://kolibrios.org@8572 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2021-02-04 15:04:33 +00:00
parent ca24e734fe
commit 98b4302a7f
2 changed files with 3 additions and 2 deletions

View File

@ -146,7 +146,8 @@ void TWebBrowser::ParseHtml(dword _bufpointer, _bufsize){
is_html = true; is_html = true;
if (!strstri(bufpointer, "<body")) { if (!strstri(bufpointer, "<body")) {
t_body = true; t_body = true;
if (!strstri(bufpointer, "<html")) && (!strstr(bufpointer, "<?xml")) && (!strstr(bufpointer, "<xml")) { if (!strstri(bufpointer, "<html")) && (!strstri(bufpointer, "<head"))
&& (!strstr(bufpointer, "<?xml")) && (!strstr(bufpointer, "<xml")) {
style.pre = true; //show linebreaks for a plaint text style.pre = true; //show linebreaks for a plaint text
is_html = false; is_html = false;
} }

View File

@ -107,4 +107,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE #define DEFAULT_URL URL_SERVICE_HOMEPAGE
char version[]="WebView 3.31"; char version[]="WebView 3.31a";