mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +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 {
|
public function getHTML(): string {
|
||||||
$fragment = $this->getRange()->cloneContents();
|
$fragment = $this->getRange()->cloneContents();
|
||||||
CommentModifier::unwrapFragment( $fragment );
|
CommentModifier::unwrapFragment( $fragment );
|
||||||
// Does not work: T357812
|
$editsection = DOMCompat::querySelector( $fragment, 'mw\\:editsection' );
|
||||||
// $editsection = DOMCompat::querySelector( $fragment, 'mw\\:editsection' );
|
if ( $editsection ) {
|
||||||
for ( $n = $fragment->firstChild; $n; $n = $n->nextSibling ) {
|
$editsection->parentNode->removeChild( $editsection );
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return DOMUtils::getFragmentInnerHTML( $fragment );
|
return DOMUtils::getFragmentInnerHTML( $fragment );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue