Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12858 closed bug (fixed)

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

Reported by: [email protected] Owned by: [email protected]
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.

Change History (7)

comment:1 Changed 10 years ago by timmywil

Component: unfiledselector
Owner: set to [email protected]
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.

comment:2 Changed 10 years ago by gibson042

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.

comment:4 Changed 10 years ago by dmethvin

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.

comment:5 Changed 10 years ago by gibson042

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.

comment:6 Changed 10 years ago by Richard Gibson

Resolution: fixed
Status: openclosed

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

Changeset: e78cfb1a3756773aec24e83e358e1e4b40f2a116

comment:7 Changed 10 years ago by gibson042

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

Note: See TracTickets for help on using tickets.