Skip to main content

Bug Tracker

Side navigation

#6344 closed bug (invalid)

Opened March 24, 2010 02:25PM UTC

Closed November 19, 2010 10:00PM UTC

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:
Blocked by: Blocking:
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

Attachments (0)
Change History (2)

Changed November 12, 2010 02:40AM UTC by snover comment:1

milestone: 1.4.3

Resetting milestone to future.

Changed November 19, 2010 10:00PM UTC by snover comment:2

priority: → undecided
resolution: → invalid
status: newclosed

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.