Internet Explorer has a broken split function

I just spent several hours working on an Internet Explorer issue. I seems Internet Explorer does NOT include empty elements in the results of a split. Browser brokeness with relation to the split function is well documented. If you have a string:

var txt = "a|b||c||d|e|f";

and you split on the | character you would expect eight pieces. Internet Explorer will only give you six pieces instead of eight because the 3rd and 5th elements are null strings. The problem is compounded if your string starts or ends with a | character.

Note: looks like this is fixed in IE9.



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.232.88.17
To prevent spam please submit by clicking the kitten: