Side navigation
#4808 closed bug (duplicate)
Opened June 23, 2009 09:57PM UTC
Closed November 14, 2010 03:12PM UTC
Last modified November 14, 2010 03:12PM UTC
IE losing whitespace when generating content from HTML with empty nodes
Reported by: | cwolves | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
javascript:alert($('<div><span /> space <span /></div>')[0].innerHTML);
in IE generates: <div><span></span>space <span></span></div>
notice there's no space before 'space'
javascript:alert($('<div><span>with content</span> space <span /></div>')[0].innerHTML);
works properly.
Basically, empty nodes strip whitespace that follows them.
There isn't a doctype IE recognizes that allows a self-closing <span /> tag. So...it's probably a crapshoot as to what IE will do with that.