Skip to main content

Bug Tracker

Side navigation

#12858 closed bug (fixed)

Opened November 07, 2012 08:13AM UTC

Closed November 10, 2012 04:44AM UTC

Last modified November 10, 2012 04:57AM UTC

Sizzle, expando, $.clone(), ie6-8

Reported by: linhao87@gmail.com Owned by: linhao87@gmail.com
Priority: undecided Milestone: None
Component: selector Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:
Description

Sizzle will add a variable: expando = ( "sizcache" + Math.random() ).replace( ".", "" ).

When i use $.clone(), the 'sizcache****' would record in html tags, i need to clear them by RegExp.

Sorry for my poor english.

Attachments (0)
Change History (7)

Changed November 07, 2012 03:30PM UTC by timmywil comment:1

component: unfiledselector
owner: → linhao87@gmail.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

Changed November 07, 2012 08:51PM UTC by gibson042 comment:2

status: pendingopen

http://jsfiddle.net/L2M6C/

I don't know if we'll want to fix this, but it is real. It affects .html() as well.

Changed November 08, 2012 03:40AM UTC by linhao87@gmail.com comment:3

Changed November 08, 2012 12:57PM UTC by dmethvin comment:4

It's been like this forever though, so although it might affect serialized html it doesn't have any really bad effects. Trying to remove those properties would make the slowest browsers even slower.

Changed November 08, 2012 01:55PM UTC by gibson042 comment:5

True, but negligibly so. It's just more removeAttributeing in cloneFixAttributes and a tweak to rinlinejQuery.

But it would add some size that might be better relegated to a plugin.

Changed November 10, 2012 04:44AM UTC by Richard Gibson comment:6

resolution: → fixed
status: openclosed

Fix #12858: don't expose jQuery/Sizzle expandos

Changeset: e78cfb1a3756773aec24e83e358e1e4b40f2a116

Changed November 10, 2012 04:57AM UTC by gibson042 comment:7

So I think I've got this fixed, but the unit test was a bit evasive. Can you confirm against the new edge build?