Bug Tracker

Modify

Ticket #11324 (closed bug: wontfix)

Opened 2 years ago

Last modified 2 years ago

document fragments leak script tags into the DOM

Reported by: gibson042 Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

jQuery.clean only scans for embedded script tags under element nodes, skipping documents and document fragments. As a result, script tags are erroneously added to the result fragment and ultimately to the DOM.

 http://jsfiddle.net/Hp37z/

Change History

comment:1 Changed 2 years ago by rwaldron

This is certainly contrived.

Version 0, edited 2 years ago by rwaldron (next)

comment:2 Changed 2 years ago by gibson042

I found it while trying to improve manipulation.js. If this were intentional, it would have hindered the effort. Since it seems to be don't-care, I offer this:  https://github.com/jquery/jquery/pull/680.

comment:3 Changed 2 years ago by rwaldron

Yes, please see my comments on the PR and on the other ticket.

comment:4 Changed 2 years ago by gibson042

Upon re-reading jQuery documentation, document fragments are not supported inputs, meaning this ticket can be closed and the behavior in that case truly a "don't care". Again, my apologies.

comment:5 Changed 2 years ago by rwaldron

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

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.