Version: (using KDE KDE 3.4.2)
Installed from: Debian testing/unstable Packages
var myString='Is this No Yes Yes ';
document.write('<p>Is this correct: '+tmpAnswer+'</p>');
In Konqueror, the tab after the "Is" is counted as 8 spaces, thus the substring begins at "No ". In all other browsers (firefox and opera), the tabs are counted a as one character, so offset 15 is right at the last "Yes".
I'll attach the sample file for quickly checking the bug.
Created attachment 13206 [details]
Simple sample page to show the bug in kde 3.4 (and 3.5)
*** Bug 115330 has been marked as a duplicate of this bug. ***
This is a KHTML parser bug. The tabs are being expanded before they arrive at KJS.
Confirmed even on konqueror 4.0.3
*** Bug 141122 has been marked as a duplicate of this bug. ***
*** Bug 170401 has been marked as a duplicate of this bug. ***
IE, FF, Opera, Safari alert TRUE
KHTML alerts FALSE because wrongly interprets TAB char (chr(9)) as spaces
Created attachment 27357 [details]
Created attachment 27361 [details]
First try at fix... Or rather, it fixes that, but exposes some other likely bugs that need to be sorted out before committing.
Fixed in r860109