Bug Tracker

Modify

Ticket #11372 (closed bug: duplicate)

Opened 15 months ago

Last modified 14 months ago

html() does not work for <link>

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

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

Change History

comment:2 follow-up: ↓ 4 Changed 15 months ago by sindresorhus

  • Priority changed from undecided to low
  • Component changed from unfiled to manipulation

.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.

comment:3 Changed 14 months ago by cmcnulty

Also reported in #11528 and fixed with pull request  718

comment:4 in reply to: ↑ 2 Changed 14 months ago by cmcnulty

Replying to 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

comment:5 Changed 14 months ago by sindresorhus

  • Status changed from new to closed
  • Resolution set to duplicate

comment:6 Changed 14 months ago by sindresorhus

Duplicate of #11528.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.