mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Remove workaround for T357812
Change-Id: I1aa3172c5656a79171351d0122f83b680adea739
This commit is contained in:
parent
0bf382329f
commit
cc9524e268
|
@ -181,20 +181,9 @@ abstract class ContentThreadItem implements JsonSerializable, ThreadItem {
|
|||
public function getHTML(): string {
|
||||
$fragment = $this->getRange()->cloneContents();
|
||||
CommentModifier::unwrapFragment( $fragment );
|
||||
// Does not work: T357812
|
||||
// $editsection = DOMCompat::querySelector( $fragment, 'mw\\:editsection' );
|
||||
for ( $n = $fragment->firstChild; $n; $n = $n->nextSibling ) {
|
||||
if ( $n instanceof Element ) {
|
||||
if ( strtolower( $n->tagName ) === 'mw:editsection' ) {
|
||||
$n->parentNode->removeChild( $n );
|
||||
break;
|
||||
}
|
||||
$editsection = DOMCompat::querySelector( $n, 'mw\\:editsection' );
|
||||
if ( $editsection ) {
|
||||
$editsection->parentNode->removeChild( $editsection );
|
||||
break;
|
||||
}
|
||||
}
|
||||
$editsection = DOMCompat::querySelector( $fragment, 'mw\\:editsection' );
|
||||
if ( $editsection ) {
|
||||
$editsection->parentNode->removeChild( $editsection );
|
||||
}
|
||||
return DOMUtils::getFragmentInnerHTML( $fragment );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue