Apps/webview: Fixed parse tag param and use Bing search
- Fixed parse case of tag param like "attr = value"; - Use the default Bing search as it only supports HTTP.
This commit is contained in:
@@ -112,6 +112,7 @@ dword _tag::get_next_param(dword ps, pe)
|
||||
// "pe" - param end
|
||||
// "q" - quote char
|
||||
char q = NULL;
|
||||
dword initial_pe = pe;
|
||||
dword fixeq;
|
||||
dword val;
|
||||
dword attr;
|
||||
@@ -145,6 +146,14 @@ dword _tag::get_next_param(dword ps, pe)
|
||||
//already have ATTR end
|
||||
}
|
||||
|
||||
if (pe > ps) pe--;
|
||||
|
||||
//Fix case: "src ="
|
||||
while (pe>ps) && (__isWhite(ESBYTE[pe])) {
|
||||
ESBYTE[pe] = '\0';
|
||||
pe--;
|
||||
}
|
||||
|
||||
//find ATTR start and copy
|
||||
while (pe>ps) && (!__isWhite(ESBYTE[pe])) pe--;
|
||||
attr = pe + 1;
|
||||
@@ -161,6 +170,8 @@ dword _tag::get_next_param(dword ps, pe)
|
||||
}
|
||||
strlwr(attr);
|
||||
strrtrim(val);
|
||||
//Fix case: " img.png"
|
||||
while(__isWhite(ESBYTE[val])) && (val<initial_pe) val++;
|
||||
|
||||
attributes.add(attr);
|
||||
values.add(val);
|
||||
|
@@ -65,6 +65,8 @@ char *unicode_symbols[]={
|
||||
"times", "x",
|
||||
"lowast","*",
|
||||
|
||||
"#128154","<3",
|
||||
|
||||
0};
|
||||
|
||||
|
||||
|
@@ -312,7 +312,7 @@ void ProcessKeyEvent()
|
||||
if (key_modifier&KEY_LSHIFT) || (key_modifier&KEY_RSHIFT)
|
||||
{
|
||||
if (key_scancode == SCAN_CODE_TAB) {EventActivatePreviousTab();return;}
|
||||
if (key_scancode == SCAN_CODE_KEY_T) {EventOpenNewTab(URL_SERVICE_TEST);return;}
|
||||
if (key_scancode == SCAN_CODE_BS) {EventOpenNewTab(URL_SERVICE_TEST);return;}
|
||||
}
|
||||
|
||||
if (key_modifier&KEY_LCTRL) || (key_modifier&KEY_RCTRL) switch(key_scancode)
|
||||
@@ -802,7 +802,8 @@ void EventSeachWeb()
|
||||
{
|
||||
char new_url[URL_SIZE+1];
|
||||
replace_char(#editURL, ' ', '+', URL_SIZE);
|
||||
strcpy(#new_url, "https://www.google.com/search?q=");
|
||||
//strcpy(#new_url, "https://html.duckduckgo.com/html/?q=");
|
||||
strcpy(#new_url, "http://bing.com/search?q=");
|
||||
strncat(#new_url, #editURL, URL_SIZE);
|
||||
OpenPage(#new_url);
|
||||
}
|
||||
|
@@ -107,4 +107,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.66-3";
|
||||
char version[]="WebView 3.7";
|
@@ -2,23 +2,22 @@
|
||||
<title>TEST</title>
|
||||
<style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style>
|
||||
<body>
|
||||
<pre>
|
||||
<a href=//kolibrios.org>KolibriOS</a>
|
||||
<a href=//kolibri-n.org>KolibriN10</a>
|
||||
<a href=//store.kolibri-n.org>Kolibri Store</a>
|
||||
<pre><a href=//wiby.org>wiby.org</a>
|
||||
<a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a>
|
||||
<a href=//macintoshgarden.org/>Macintosh Garden</a>
|
||||
|
||||
<table><tr><td>Simplest:
|
||||
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
|
||||
<a href=//pci-ids.ucw.cz>pci.ids</a>
|
||||
<a href=//dgmag.in>dgmag.in</a>
|
||||
<a href=//bash.im>bash.im</a>
|
||||
<a href=//opennet.ru>opennet</a>
|
||||
<a href=//web.archive.org/web/https://bash.im>bash.im</a>
|
||||
<a href=//web.archive.org/web/https://opennet.ru>opennet</a>
|
||||
<a href=//linux.org.ru>LOR</a>
|
||||
<a href=//baravy.by/me/b.html>baravy.by/me/b.html</a>
|
||||
<a href=//samlib.ru/b>samlib.ru/b</a>
|
||||
<a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
|
||||
<a href=//web.archive.org/web/https://samlib.ru/b>samlib.ru/b</a>
|
||||
<a href=//web.archive.org/web/https://mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
|
||||
<a href=//web.archive.org/web/http://gona.mactar.hu/ATI_Mac/>ATI drivers for Mac</a>
|
||||
<td>Simple:
|
||||
<a href=//lionovsky.us>lionovsky.us</a>
|
||||
<a href=//web.archive.org/web/http://lionovsky.us>lionovsky.us</a>
|
||||
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a>
|
||||
<a href=//mestack.narod.ru/index.html>mestack.narod.ru</a>
|
||||
<a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
|
||||
@@ -34,8 +33,7 @@ Moderate:
|
||||
<a href=//www.weitek.com/textual/support/driver.html>weitek</a>
|
||||
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
|
||||
<td>Complex:
|
||||
<a href=//artcon.ru>artcon.ru</a>
|
||||
<a href=//web.archive.org/web/https://artcon.ru>artcon.ru</a>
|
||||
<a href=//nubo.ru>nubo.ru</a>
|
||||
<a href=//salinc.ru>salinc.ru</a>
|
||||
<a href=//electromyne.de>electromyne.de</a>
|
||||
<a href=//www.thg.ru/graphic/25year_ati_history>tom's hardware</a>
|
||||
<a href=//web.archive.org/web/20190403215447//www.thg.ru/>thg</a>
|
Reference in New Issue
Block a user