Bug Tracker

Modify

Ticket #6344 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

selector bug with div and script

Reported by: ShoAn Owned by:
Priority: undecided Milestone:
Component: selector Version: 1.4.2
Keywords: selector script tag Cc:
Blocking: Blocked by:

Description

Hello,

I tried to migrate from 1.3.2 to 1.4.2.

If I want to select a div, which contains a script tag, I found a different behavior between these versions: jQuery 1.4.2 returns the script tag, too ... ?? tested on ff 3.6.2 and ie 8

<body>
<div id="test">
    <script></script>
    <p></p>
</div>

<script type="text/javascript">
    console.info($('#test'));
    console.info($('\
        <div>\
            <script><\/script>\
            <p><\/p>\
        <\/div>\
    '));
</script>
</body>

output with jQuery 1.3.2

[div#test]
[div]

output with jQuery 1.4.2

[div#test]
[div, script]

Greets, Dominik Winter

Change History

comment:1 Changed 3 years ago by snover

  • Milestone 1.4.3 deleted

Resetting milestone to future.

comment:2 Changed 3 years ago by snover

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to invalid

Thanks for the report, but this is not a jQuery bug. The script tag is only removed once an element is added to the DOM.

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.