Skip to main content

Bug Tracker

Side navigation

#13200 closed bug (fixed)

Opened January 12, 2013 06:10AM UTC

Closed January 14, 2013 12:13AM UTC

XHTML .html() on <table> & subelements

Reported by: anthonyryan1@gmail.com Owned by: markelog
Priority: blocker Milestone: 1.9
Component: manipulation Version: 1.9rc1
Keywords: Cc:
Blocked by: Blocking:
Description

All .html() calls modifying <table> or subelements of it are failing on documents in XHTML mode.

I will provide a test case shortly.

Attachments (0)
Change History (7)

Changed January 12, 2013 08:10AM UTC by anthonyryan1 comment:1

Unfortunately I don't believe jsFiddle can provide a proper XHTML document for this test case, so I've hosted it here for time being: https://whatbox.ca/bugs/jq13200

I've tested and got this problem in Firefox 17, Chrome 24 & Opera 12.11.

Changed January 12, 2013 03:03PM UTC by dmethvin comment:2

cc: → markelog
status: newopen

Ugh. I am pretty sure this is due to removing the closing tags in .clean(), which is now part of .buildFragment(). I should have thought of that case, but unfortunately we don't yet run the unit tests in XHTML. See #10198.

@orkel can you take a look?

P.S. I hate XHTML.

Changed January 13, 2013 06:30PM UTC by markelog comment:3

cc: markelog
component: unfiledmanipulation
milestone: None1.9
owner: → markelog
priority: undecidedblocker
status: openassigned

@dmethvin i should have foresee this too :-(,

@anthonyryan1 many thanks!

PR's for 1.9 and 2.0

Changed January 13, 2013 07:27PM UTC by dmethvin comment:4

Yeah as soon as I saw this ticket I realized why we still needed them. I guess we all hate XHTML! Thanks for the pulls, I'm on a plane and my battery is almost gone so I'll land them, um, when I land.

Changed January 13, 2013 07:39PM UTC by markelog comment:5

I didn't before, but now i really do... safe landing!

Changed January 14, 2013 12:01AM UTC by anthonyryan1 comment:6

I just feel the need to chime in pro-XHTML.

Leaving out the ending tag in HTML is like never using semicolons in your javascript. While you can do it, it can cause rare but unexpected consequences when misused. As such, it's always preferable to use them as the language intended.

Just my two cents.

Changed January 14, 2013 12:13AM UTC by Oleg comment:7

resolution: → fixed
status: assignedclosed

Fixes #13200 - innerHTML in buildFragment need end tags

Changeset: bf4fce70408b67d1bf628932ec31dafa14eb007c