Tails
03-16-2004, 05:58 PM
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):
<p>
A<br /><br />
B<br /><br />
C<br />
<br />
D<br /><br />
E
</p>
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 (http://bugzilla.mozilla.org/show_bug.cgi?id=237330) I submitted).
Is there a regular expression that can handle this? You can use regular expressions in split() too right?
<p>
A<br /><br />
B<br /><br />
C<br />
<br />
D<br /><br />
E
</p>
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 (http://bugzilla.mozilla.org/show_bug.cgi?id=237330) I submitted).
Is there a regular expression that can handle this? You can use regular expressions in split() too right?