Ticket #5720 (closed bug: duplicate)
`expando` cleanup in `.html()` and `.clone()` is too greedy
|Reported by:||maranomynet||Owned by:|
There's a bug in the rinlinejQuery regexp that makes it a bit too "greedy":
jQuery('<p> jQuery12="0" </p>').html(); // returns: " "
In manipulation.js, line 1 should be changed to something like:
var rinlinejQuery = /(<\w[^<]+) jQuery\d+="(?:\d+|null)"/g, ^^^^^^^^^^
.replace(rinlinejQuery, "$1") ^^^^
Actually this whole rinlinejQuery business is a bit of an ugly hack. Would it perhaps be feasible to fix the expando value in a way similar to what Andrea Giammarchi suggests in this jquery-dev post?