Bug 115330 - A tab in a string causes the split(' ') method to miss some split points
Summary: A tab in a string causes the split(' ') method to miss some split points
Status: RESOLVED DUPLICATE of bug 115325
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-29 18:10 UTC by Reinhold Kainhofer
Modified: 2005-10-29 18:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Sample file to show the bug (some split points are missed, and the tabs are not correctly removed from the result) (642 bytes, text/html)
2005-10-29 18:11 UTC, Reinhold Kainhofer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhold Kainhofer 2005-10-29 18:10:18 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Debian testing/unstable Packages

I have a tab-delimited javascript string which I want to split into its parts by split('	') (that's a single tab character between the quotes). However, the split method in Konqueror misses several tabs. 

Example:
The string to be split contains a tab between every word:

<script language='javascript'>
<!--
var myString='Is	this	string	split	correctly	?	Check	it	out	yourself	';
var mySplitString=myString.split('	');
document.write('<p>Split at:</p><p>'+mySplitString.join('|')+'</p>');


The result in Konqueror is:
Is| this string split correctly| ?| Check it|out yourself|

Notice that there (1) several tabs are missed and the string not split there and (2) at most places where the string is split, the tab is not correctly removed as the split should do it.


The correct result (in firefox and opera) would be:
Is|this|string|split|correctly|?|Check|it|out|yourself|


I'm attaching a sample file to quickly check this bug in the future.

Cheers,
Reinhold
Comment 1 Reinhold Kainhofer 2005-10-29 18:11:05 UTC
Created attachment 13209 [details]
Sample file to show the bug (some split points are missed, and the tabs are not correctly removed from the result)
Comment 2 George Staikos 2005-10-29 18:34:15 UTC
Will explain in other report.

*** This bug has been marked as a duplicate of 115325 ***