Skip to main content

Bug Tracker

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.

Attachments (0)
Change History (3)

Changed October 03, 2009 01:44AM UTC by dmethvin comment:1

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.

Changed November 14, 2010 03:12PM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

Changed November 14, 2010 03:12PM UTC by dmethvin comment:3

Duplicate of #3144.