diff --git a/src/Parsoid/Ref.php b/src/Parsoid/Ref.php index 3dd681c05..508635c0e 100644 --- a/src/Parsoid/Ref.php +++ b/src/Parsoid/Ref.php @@ -155,7 +155,7 @@ class Ref extends ExtensionTagHandler { if ( $hasRefName ) { // Follow content may have been added as spans, so drop it if ( DOMCompat::querySelector( $bodyElt, "span[typeof~='mw:Cite/Follow']" ) ) { - $bodyElt = $bodyElt->cloneNode( true ); + $bodyElt = DOMDataUtils::cloneNode( $bodyElt, true ); foreach ( $bodyElt->childNodes as $child ) { if ( DOMUtils::hasTypeOf( $child, 'mw:Cite/Follow' ) ) { // @phan-suppress-next-line PhanTypeMismatchArgumentSuperType