8000 Back port of 3.5.0 fixes to CVE-2020-11022/CVE-2020-11023 · roytoo/jquery@97c9343 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97c9343

Browse files
committed
1 parent 1219ca9 commit 97c9343

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/manipulation.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
1616
rscriptTypeMasked = /^true\/(.*)/,
1717
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
1818
wrapMap = {
19-
option: [ 1, "<select multiple='multiple'>", "</select>" ],
2019
legend: [ 1, "<fieldset>", "</fieldset>" ],
2120
thead: [ 1, "<table>", "</table>" ],
2221
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
@@ -26,10 +25,14 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
2625
_default: [ 0, "", "" ]
2726
};
2827

29-
wrapMap.optgroup = wrapMap.option;
3028
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
3129
wrapMap.th = wrapMap.td;
3230

31+
// Support: IE <=9 only
32+
if ( !jQuery.support.option ) {
33+
wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
34+
}
35+
3336
// IE can't serialize <link> and <script> tags normally
3437
if ( !jQuery.support.htmlSerialize ) {
3538
wrapMap._default = [ 1, "div<div>", "</div>" ];

0 commit comments

Comments
 (0)
0