YF-GoogleCodeBackups / https-finder

Automatically exported from code.google.com/p/https-finder
0 stars 0 forks source link

a few issues with .xx ccTLD -based sites . I have a partial fix, see below. #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to use the program normally on a site inside a 2-letter TLD
(like any ccTLD)

What is the expected output? What do you see instead?
Expect: a correctly generated xml file

Result: the web site name is mangled inside the file.
Once it has a \0 in it, once it has a zero(digit).
The file name is mangled too.

What version of the product are you using? On what operating system?
Last version of today, 0.30, on linux.

Please provide any additional information below.

I fixed it on my computer and it works. Here's the diffs:

diff browserOverlay.js-my browserOverlay.js-original
<             title = hostname.slice(hostname.indexOf(".",0) + 
1,hostname.lastIndexOf(".") /* - 3 */);

---
>             title = hostname.slice(hostname.indexOf(".",0) + 
1,hostname.lastIndexOf(".",0) - 3);
168c168
<             title = hostname.slice(0, hostname.lastIndexOf(".") /* - 3 */ ); 

---
>             title = hostname.slice(0, hostname.lastIndexOf(".", 0) - 3);
175,176c175
< //                var topLevel = i;
<               var topLevel = httpsfinder.browserOverlay.TLD[i]; 

---
>                 var topLevel = i;

Also the short list of TLDs and ccTLDs is quite lame. Not even sure if .co.xx 
would work in this product.
Expect: use regexps for all that, easier, faster to code and more foolproof.

Original issue reported on code.google.com by gschroedinger@gmail.com on 24 Mar 2011 at 10:48

GoogleCodeExporter commented 8 years ago
I'm not sure how I let this slip through to release but it was fixed in version 
0.31.  There is a note about it on the Mozilla site, but they take a week to 
review and post the new version.  0.31 Should work for all TLDs.  Let be know 
if you still have problems after upgrading.

Original comment by jacobsK...@gmail.com on 24 Mar 2011 at 11:23