Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#4808 closed bug (duplicate)

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.

Change History (3)

comment:1 Changed 10 years ago by dmethvin

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.

comment:2 Changed 9 years ago by dmethvin

Resolution: duplicate
Status: newclosed

comment:3 Changed 9 years ago by dmethvin

Duplicate of #3144.

Note: See TracTickets for help on using tickets.