diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c
index c8f273e92b..f81e148e1a 100644
--- a/programs/cmm/TWB/TWB.c
+++ b/programs/cmm/TWB/TWB.c
@@ -180,8 +180,13 @@ void TWebBrowser::Prepare(){
bufpos++;
if (!strncmp(bufpos,"!--",3))
{
- if (!strncmp(bufpos,"-->",3)) || (bufpointer + bufsize <= bufpos) break;
- bufpos++;
+ bufpos+=3;
+ while (strncmp(bufpos,"-->",3)!=0) && (bufpos < bufpointer + bufsize)
+ {
+ bufpos++;
+ }
+ bufpos+=3;
+ break;
}
tag = attr = tagparam = ignor_param = NULL;
while (ESBYTE[bufpos] !='>') && (bufpos < bufpointer + bufsize) //ïîëó÷àåì òåã è åãî ïàðàìåòðû
diff --git a/programs/cmm/TWB/parce_tag.h b/programs/cmm/TWB/parce_tag.h
index 589776fb95..a17931609a 100644
--- a/programs/cmm/TWB/parce_tag.h
+++ b/programs/cmm/TWB/parce_tag.h
@@ -14,7 +14,7 @@ unsigned int GetNextParam()
if (kavichki)
{
- i=strrchr(#tagparam, kavichki);
+ i = strrchr(#tagparam, kavichki);
strlcpy(#val, #tagparam + i, sizeof(val));
}
else
@@ -24,6 +24,7 @@ unsigned int GetNextParam()
strlcpy(#val, #tagparam + i, sizeof(val));
WHILE (val[0] == ' ') strcpy(#val, #val+1);
+ ESBYTE[strchr(#val, ' ')] = NULL;
}
tagparam[i] = 0x00;
diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c
index ece281c7b4..987ed2e25c 100644
--- a/programs/cmm/browser/WebView.c
+++ b/programs/cmm/browser/WebView.c
@@ -30,7 +30,7 @@
char homepage[] = FROM "html\\homepage.htm""\0";
#ifdef LANG_RUS
-char version[]="⮢ 㧥 1.62";
+char version[]="⮢ 㧥 1.7";
?define IMAGES_CACHE_CLEARED " ⨭ 饭"
?define T_LAST_SLIDE " "
char loading[] = "㧪 ࠭...
";
@@ -43,7 +43,7 @@ char rmb_menu[] =
⨭
㧮";
#else
-char version[]="Text-based Browser 1.62";
+char version[]="Text-based Browser 1.7";
?define IMAGES_CACHE_CLEARED "Images cache cleared"
?define T_LAST_SLIDE "This slide is the last"
char loading[] = "Loading...
";
@@ -569,10 +569,13 @@ void ClickLink()
if (UrlExtIs(".png")==true) || (UrlExtIs(".gif")==true) || (UrlExtIs(".jpg")==true)
|| (UrlExtIs(".zip")==true) || (UrlExtIs(".kex")==true) || (UrlExtIs(".pdf")==true)
|| (UrlExtIs(".7z")==true) {
- strcpy(#downloader_edit, #URL);
- CreateThread(#Downloader,#downloader_stak+4092);
- strcpy(#editURL, history.current());
- strcpy(#URL, history.current());
+ if (!downloader_opened) {
+ strcpy(#downloader_edit, #URL);
+ CreateThread(#Downloader,#downloader_stak+4092);
+ strcpy(#editURL, history.current());
+ strcpy(#URL, history.current());
+ }
+ else notify("'WebView\nPlease, start a new download only when previous ended.'Et");
return;
}
}
diff --git a/programs/cmm/browser/show_src.h b/programs/cmm/browser/show_src.h
index 7383d75682..362ce09869 100644
--- a/programs/cmm/browser/show_src.h
+++ b/programs/cmm/browser/show_src.h
@@ -19,17 +19,25 @@ dword ShowSource()
switch (ww)
{
case '<':
+ if (mode == COMMENT)
+ {
+ strcpy(new_buf, "<");
+ new_buf+=4;
+ break;
+ }
if (ESBYTE[i+1]=='!') && (ESBYTE[i+2]=='-') && (ESBYTE[i+3]=='-')
{
strcpy(new_buf, "<");
new_buf+=21;
mode = COMMENT;
+ break;
}
if (mode != COMMENT)
{
strcpy(new_buf, "<");
new_buf+=21;
mode = TAG;
+ break;
}
break;
case '>':
@@ -38,18 +46,27 @@ dword ShowSource()
strcpy(new_buf, """);
new_buf+=13;
mode = TAG;
+ break;
}
if (mode == COMMENT) && (ESBYTE[i-1]=='-') && (ESBYTE[i-2]=='-')
{
strcpy(new_buf, ">");
new_buf+=11;
mode = TEXT;
+ break;
+ }
+ if (mode == COMMENT)
+ {
+ strcpy(new_buf, ">");
+ new_buf+=4;
+ break;
}
if (mode == TAG)
{
strcpy(new_buf, ">");
new_buf+=11;
mode = TEXT;
+ break;
}
break;
case '\"':