@@ -1560,10 +1560,8 @@ var htmx = (function() {
15601560 forEach ( fragment . querySelectorAll ( '[id]' ) , function ( newNode ) {
15611561 const id = getRawAttribute ( newNode , 'id' )
15621562 if ( id && id . length > 0 ) {
1563- const normalizedId = id . replace ( "'" , "\\'" )
1564- const normalizedTag = newNode . tagName . replace ( ':' , '\\:' )
15651563 const parentElt = asParentNode ( parentNode )
1566- const oldNode = parentElt && parentElt . querySelector ( normalizedTag + "[id='" + normalizedId + "']" )
1564+ const oldNode = parentElt && parentElt . querySelector ( CSS . escape ( newNode . tagName ) + '#' + CSS . escape ( id ) )
15671565 if ( oldNode && oldNode !== parentElt ) {
15681566 const newAttributes = newNode . cloneNode ( )
15691567 cloneAttributes ( newNode , oldNode )
@@ -1979,7 +1977,7 @@ var htmx = (function() {
19791977 removeClassFromElement ( target , htmx . config . swappingClass )
19801978 forEach ( settleInfo . elts , function ( elt ) {
19811979 if ( elt . classList ) {
1982- elt . classList . add ( htmx . config . settlingClass )
1980+ addClassToElement ( elt , htmx . config . settlingClass )
19831981 }
19841982 triggerEvent ( elt , 'htmx:afterSwap' , swapOptions . eventInfo )
19851983 } )
@@ -3378,7 +3376,7 @@ var htmx = (function() {
33783376 forEach ( indicators , function ( ic ) {
33793377 const internalData = getInternalData ( ic )
33803378 internalData . requestCount = ( internalData . requestCount || 0 ) + 1
3381- ic . classList . add . call ( ic . classList , htmx . config . requestClass )
3379+ addClassToElement ( ic , htmx . config . requestClass )
33823380 } )
33833381 return indicators
33843382 }
@@ -4915,7 +4913,7 @@ var htmx = (function() {
49154913 swapSpec . ignoreTitle = ignoreTitle
49164914 }
49174915
4918- target . classList . add ( htmx . config . swappingClass )
4916+ addClassToElement ( target , htmx . config . swappingClass )
49194917
49204918 if ( responseInfoSelect ) {
49214919 selectOverride = responseInfoSelect
0 commit comments