Skip to main content

Bug Tracker

Side navigation

#11372 closed bug (duplicate)

Opened February 22, 2012 04:05AM UTC

Closed April 03, 2012 11:12PM UTC

Last modified April 03, 2012 11:12PM UTC

html() does not work for <link>

Reported by: yiminghe Owned by:
Priority: low Milestone: None
Component: manipulation Version: git
Keywords: Cc:
Blocked by: Blocking:
Description

1. open http://jsfiddle.net/QF7e8/4/ in ie6789,chrome,firefox

expected:

all browser are same , "1" does not have a circle before it.

actual:

in ie678 , "1" has a circle before it

Attachments (0)
Change History (6)

Changed February 22, 2012 04:07AM UTC by yiminghe comment:1

Changed February 22, 2012 09:16AM UTC by sindresorhus comment:2

component: unfiledmanipulation
priority: undecidedlow

.append() works, .html() doesn't.

From the HTML spec:

This element defines a link. Unlike A, it may only appear in the HEAD section of a document

Even though '<link>' should only be in head, browsers are apparently very forgiving.

Since it should only be in head, you can't really use .html() there, so not really sure if this should be fixed.

Changed April 02, 2012 04:47PM UTC by cmcnulty comment:3

Also reported in #11528 and fixed with pull request 718

Changed April 02, 2012 04:49PM UTC by cmcnulty comment:4

Replying to [comment:2 sindresorhus]:

Even though '<link>' should only be in head, browsers are apparently very forgiving. Since it should only be in head, you can't really use .html() there, so not really sure if this should be fixed.

And for the record, I agree with this comment, except that we already fix it in cases of style and script, so we have a precedent, and the code is as easy as adding link to the noInnerhtml text

Changed April 03, 2012 11:12PM UTC by sindresorhus comment:5

resolution: → duplicate
status: newclosed

Changed April 03, 2012 11:12PM UTC by sindresorhus comment:6

Duplicate of #11528.