and (T10393) * - (T28375) * - (r105284) * - (T74884) * - and (T37167) * (handled separately in code below) * - and (T35715) * - (T251672) */ private const ALLOWED_NODES_IN_ANCHOR = [ 'span', 'sup', 'sub', 'i', 'b', 'bdi', 's', 'strike', 'q' ]; /** * This method implements the equivalent of the regexp-based safe-headline * transform in Parser::finalizeHeadings in core. * * @param Node $node */ private static function processHeadingContent( Node $node ): void { $c = $node->firstChild; while ( $c ) { $next = $c->nextSibling; if ( $c instanceof Element ) { $cName = DOMCompat::nodeName( $c ); if ( DOMUtils::hasTypeOf( $c, 'mw:LanguageVariant' ) ) { // Special case for -{...}- $dp = DOMDataUtils::getDataParsoid( $c ); $node->replaceChild( $node->ownerDocument->createTextNode( $dp->src ?? '' ), $c ); } elseif ( in_array( $cName, [ 'style', 'script' ], true ) ) { # Remove any