Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-16-2004, 05:58 PM #1
- Join Date
- Nov 2002
- Thanked 1 Time in 1 Post
innerHTML problem in Mozilla with split()
In Mozilla, whitespace and line breaks are shown in the innerHTML (try alerting and you'll see). On my forum, I'm making a mod that must split up HTML tags in a certain way (the forum source is beyong my control):
A<br /><br />
B<br /><br />
D<br /><br />
Note the space between the pair of <br /> tags between C and D. IE will split all of these without a problem, but Mozilla can't. (see Bug 237330 I submitted).
Is there a regular expression that can handle this? You can use regular expressions in split() too right?
03-17-2004, 12:28 AM #2
- Join Date
- Jun 2002
- near Oswestry
- Thanked 0 Times in 0 Posts
That bug is marked RESOLVED - WONTFIX. That's because it's the author's responsibility to deal with whitespace, not the browser's.
Anyway Alex wrote a method for cleaning whitespace that should solve your problem - Cleaning useless whitespace in Mozilla DOM
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark