This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
jquery-1.12.4.patch
69 lines (56 loc) · 2.07 KB
/
jquery-1.12.4.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--- jquery-1.12.4.js 2020-05-03 21:28:54.000000000 +0200
+++ jquery-1.12.4.js 2020-05-03 21:27:42.000000000 +0200
@@ -209,8 +209,9 @@
src = target[ name ];
copy = options[ name ];
+ // Prevent Object.prototype pollution
// Prevent never-ending loop
- if ( target === copy ) {
+ if ( name === "__proto__" || target === copy ) {
continue;
}
@@ -4492,6 +4493,12 @@
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+ // Support: IE <=9 only
+ // IE <=9 replaces <option> tags with their contents when inserted outside of
+ // the select element.
+ div.innerHTML = "<option></option>";
+ support.option = !!div.lastChild;
+
// #11217 - WebKit loses check when the name is after the checked attribute
fragment.appendChild( div );
@@ -4522,7 +4529,6 @@
// We have to close these tags to support XHTML (#13200)
var wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
area: [ 1, "<map>", "</map>" ],
@@ -4538,12 +4544,14 @@
_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
};
-// Support: IE8-IE9
-wrapMap.optgroup = wrapMap.option;
-
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
+// Support: IE <=9 only
+if ( !support.option ) {
+ wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
+}
+
function getAll( context, tag ) {
var elems, elem,
@@ -5871,7 +5879,6 @@
var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ),
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
// Support: IE 10-11, Edge 10240+
// In IE/Edge using regex groups here causes severe slowdowns.
@@ -6127,7 +6134,7 @@
jQuery.extend( {
htmlPrefilter: function( html ) {
- return html.replace( rxhtmlTag, "<$1></$2>" );
+ return html;
},
clone: function( elem, dataAndEvents, deepDataAndEvents ) {