Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
Search Space Bug
Posted by: jsnj
Date: June 04, 2009 12:00AM

Not sure if this has been reported, but I didn't find it in BTS. Posting here to see if anyone else can reproduce it.

Open the search prompt, click the space bar and click OK or hit ENTER, the browser closes/crashes. Or clear the URL bar, click the space bar and search = same result. I've tried it in 1.5.2 & 3. Doesn't happen in v1.1. Anyone else?

Options: ReplyQuote
Re: Search Space Bug
Posted by: Paul
Date: June 04, 2009 01:30AM

Yeah I get the same browser crash. (Abnormal Termination). Just not sure why I would follow those key sequences to begin with? :O

Using 1.5.3



Edited 1 time(s). Last edit at 06/04/2009 01:31AM by Paul.

Options: ReplyQuote
Re: Search Space Bug
Posted by: JamesD
Date: June 04, 2009 01:31AM

Quote
jsnj
Open the search prompt, click the space bar and click OK
This crashed my 1.5.2 version on XP-SP3.

Options: ReplyQuote
Re: Search Space Bug
Posted by: disrupted
Date: June 04, 2009 02:48AM

whoopsie daisy.. this looks like a compiler bug. dorian is not gonna like this one.
jsj.. please report it in the bugs wiki.

Options: ReplyQuote
Re: Search Space Bug
Posted by: desga2
Date: June 04, 2009 12:25PM

Temporal fixed to this urlencode() macro function bug:

Add this lines in K-Meleon\macros\search.kmm file:
_Search_Typed{
$__query=$URLBAR;
$__query==$URL?$__query=prompt(_("Enter search query:"),sub("%s",$_Search_EngineName,_("Search (%s)"))):0;
# Next line to fix blank spaces in urlencode() macro function:
$__query==" "?$__query="":0;
$OpenURL=$__query==""?"":$_Search_EngineURL.urlencode($__query);
# prevent search queries from being added to the MRU
$__pref="kmeleon.MRU.behavior"; $__data=getpref(INT,$__pref); $__data==2?setpref(INT,$__pref,3):0; &OpenURL_Typed; setpref(INT,$__pref,$__data);
}


_Search_Metasearch_Typed{
$_pref=$_OpenURL_Typed;
$_Search_Metasearch_Query=$URLBAR; $_Search_Metasearch_Query==$URL?$_Search_Metasearch_Query=prompt(_("Enter search query:"),sub("%s",_("Multisearch"),_("Search (%s)"))):0; 
# Next line to fix blank spaces in urlencode() macro function:
$_Search_Metasearch_Query==" "?$_Search_Metasearch_Query="":0;
$_Search_Metasearch_Query==""?0:&_Search_Metasearch_Open;
}

Bur reported in BTS: # 1126

K-Meleon in Spanish



Edited 1 time(s). Last edit at 06/04/2009 12:34PM by desga2.

Options: ReplyQuote
Re: Search Space Bug
Posted by: jsnj
Date: June 04, 2009 05:38PM

Quote
Paul
Yeah I get the same browser crash. (Abnormal Termination). Just not sure why I would follow those key sequences to begin with? :O

Using 1.5.3


I used the space bar instead of the backspace button to clear the selected/highlighted data that was entered. That's how I stumbled upon it.


Quote
desga2
Temporal fixed to this urlencode() macro function bug:
...

Bur reported in BTS: # 1126

Thanks Desga. Is there a formulaic way to detect if there is more than one space? Same crash happens with 2 or more spaces.

Options: ReplyQuote
Re: Search Space Bug
Posted by: JujuLand
Date: June 04, 2009 08:36PM

Perhaps by replacing this :

# Next line to fix blank spaces in urlencode() macro function:
$_Search_Metasearch_Query==" "?$_Search_Metasearch_Query="":0;
$_Search_Metasearch_Query==""?0:&_Search_Metasearch_Open;

by this

# Next line to fix blank spaces in urlencode() macro function:
$_Search_Metasearch_Query=sub($_Search_Metasearch_Query," ","");
$_Search_Metasearch_Query==""?0:&_Search_Metasearch_Open;

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Search Space Bug
Posted by: desga2
Date: June 04, 2009 10:18PM

Better solution for fix this problem with blank spaces in urlencode().
Replace this two macro functions in K-Meleon\macros\search.kmm file:
_Search_Typed{
$__query=$URLBAR;
$__query==$URL?$__query=prompt(_("Enter search query:"),sub("%s",$_Search_EngineName,_("Search (%s)"))):0;
# Next lines to fix blank spaces in urlencode() macro function:
$_blank=-1;
$_blank=index($__query," ");
$_blank==-1?$_blank=index($__query,"	"):0;
while($_blank==0) {
$__query=substr($__query,1);
$_blank=index($__query," ");
$_blank==-1?$_blank=index($__query,"	"):0;
}
# End of lines to fix blank spaces  in urlencode() macro function.
$OpenURL=$__query==""?"":$_Search_EngineURL.urlencode($__query);
# prevent search queries from being added to the MRU
$__pref="kmeleon.MRU.behavior"; $__data=getpref(INT,$__pref); $__data==2?setpref(INT,$__pref,3):0; &OpenURL_Typed; setpref(INT,$__pref,$__data);
}
_Search_Metasearch_Typed{
$_pref=$_OpenURL_Typed;
$_Search_Metasearch_Query=$URLBAR; $_Search_Metasearch_Query==$URL?$_Search_Metasearch_Query=prompt(_("Enter search query:"),sub("%s",_("Multisearch"),_("Search (%s)"))):0; 
# Next lines to fix blank spaces in urlencode() macro function:
$_blank=-1;
$_blank=index($_Search_Metasearch_Query," ");
$_blank==-1?$_blank=index($_Search_Metasearch_Query,"	"):0;
while($_blank==0) {
$_Search_Metasearch_Query=substr($_Search_Metasearch_Query,1);
$_blank=index($_Search_Metasearch_Query," ");
$_blank==-1?$_blank=index($_Search_Metasearch_Query,"	"):0;
}
# End of lines to fix blank spaces  in urlencode() macro function.
$_Search_Metasearch_Query==""?0:&_Search_Metasearch_Open;
}

K-Meleon in Spanish



Edited 4 time(s). Last edit at 06/04/2009 10:33PM by desga2.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.