@@ -1556,9 +1556,9 @@ setDocument = Sizzle.setDocument = function( node ) {
15561556 // setting a boolean content attribute,
15571557 // since its presence should be enough
15581558 // https://bugs.jquery.com/ticket/12359
1559- docElem . appendChild ( el ) . innerHTML = "<a id='" + expando + "'></a>" +
1559+ docElem . appendChild ( el ) . innerHTML = DOMPurify . sanitize ( "<a id='" + expando + "'></a>" +
15601560 "<select id='" + expando + "-\r\\' msallowcapture=''>" +
1561- "<option selected=''></option></select>" ;
1561+ "<option selected=''></option></select>" ) ;
15621562
15631563 // Support: IE8, Opera 11-12.16
15641564 // Nothing should be selected when empty strings follow ^= or $= or *=
@@ -1595,8 +1595,8 @@ setDocument = Sizzle.setDocument = function( node ) {
15951595 } ) ;
15961596
15971597 assert ( function ( el ) {
1598- el . innerHTML = "<a href='' disabled='disabled'></a>" +
1599- "<select disabled='disabled'><option/></select>" ;
1598+ el . innerHTML = DOMPurify . sanitize ( "<a href='' disabled='disabled'></a>" +
1599+ "<select disabled='disabled'><option/></select>" ) ;
16001600
16011601 // Support: Windows 8 Native Apps
16021602 // The type and name attributes are restricted during .innerHTML assignment
@@ -3021,7 +3021,7 @@ support.sortDetached = assert(function( el ) {
30213021// Prevent attribute/property "interpolation"
30223022// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
30233023if ( ! assert ( function ( el ) {
3024- el . innerHTML = "<a href='#'></a>" ;
3024+ el . innerHTML = DOMPurify . sanitize ( "<a href='#'></a>" ) ;
30253025 return el . firstChild . getAttribute ( "href" ) === "#" ;
30263026} ) ) {
30273027 addHandle ( "type|href|height|width" , function ( elem , name , isXML ) {
@@ -3034,7 +3034,7 @@ if ( !assert(function( el ) {
30343034// Support: IE<9
30353035// Use defaultValue in place of getAttribute("value")
30363036if ( ! support . attributes || ! assert ( function ( el ) {
3037- el . innerHTML = "<input/>" ;
3037+ el . innerHTML = DOMPurify . sanitize ( "<input/>" ) ;
30383038 el . firstChild . setAttribute ( "value" , "" ) ;
30393039 return el . firstChild . getAttribute ( "value" ) === "" ;
30403040} ) ) {
@@ -5273,4 +5273,4 @@ var initPageMessageListener = function () { // jshint ignore:line
52735273 init ( ) ;
52745274} ) ( ) ;
52755275
5276- } ) ( window ) ;
5276+ } ) ( window ) ;
0 commit comments