From 18e523281c2c67d4c85d406541a60ad7f3e60670 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 2 Nov 2022 00:19:46 +0000 Subject: [PATCH] Avoid unsafe wrapping of Message::parse() into paragraph Bug: T322173 Change-Id: I8405a33129ab17edcb7a02440146684170f1c0a7 --- includes/SpecialFindComment.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/SpecialFindComment.php b/includes/SpecialFindComment.php index 6f5da48dc..d6987e38c 100644 --- a/includes/SpecialFindComment.php +++ b/includes/SpecialFindComment.php @@ -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 ) ) ); }