Avoid unsafe wrapping of Message::parse() into paragraph

Bug: T322173
Change-Id: I8405a33129ab17edcb7a02440146684170f1c0a7
This commit is contained in:
Timo Tijhof 2022-11-02 00:19:46 +00:00
parent 422e9aabf2
commit 18e523281c

View file

@ -91,11 +91,11 @@ class SpecialFindComment extends FormSpecialPage {
}
if ( $results ) {
$out->addHTML( Html::rawElement( 'p', [],
$this->msg( 'discussiontools-findcomment-gotocomment', $this->idOrName )->parse() ) );
$out->addHTML(
$this->msg( 'discussiontools-findcomment-gotocomment', $this->idOrName )->parseAsBlock() );
} elseif ( $this->idOrName ) {
$out->addHTML( Html::rawElement( 'p', [],
$this->msg( 'discussiontools-findcomment-noresults' )->parse() ) );
$out->addHTML(
$this->msg( 'discussiontools-findcomment-noresults' )->parseAsBlock() );
}
}
@ -112,7 +112,7 @@ class SpecialFindComment extends FormSpecialPage {
$list[] = Html::rawElement( 'li', [], $line );
}
$out->addHTML( Html::rawElement( 'p', [], $this->msg( $msgKey, count( $list ) )->parse() ) );
$out->addHTML( $this->msg( $msgKey, count( $list ) )->parseAsBlock() );
$out->addHTML( Html::rawElement( 'ul', [], implode( '', $list ) ) );
}