[thelist] JavaScript substring and linebreaks on IE & Firefox bug..

Mark Mandel mark.mandel at gmail.com
Wed May 24 19:12:32 CDT 2006


Hi,

I've got a small test bed here to show this:
http://users.cyberone.com.au/markm/substring/

It seems that when you have linebreaks in a string (i.e. text from a
textfield), the way that IE handles it, and the way Firefox handles it
are completley different. One counts line breaks, and one doesn't.

This seems to be the case for both substr(), and substring().

Has anyone ever encountered this before? and if so, what was your solution?

We're starting to experiment with using regex's to do it, but this
seems like overkill to me.

Any thoughts?

Cheers,

Mark

-- 
E: mark.mandel at gmail.com
W: www.compoundtheory.com
ICQ: 3094740



More information about the thelist mailing list