Issue #3422222 by gorkagr, mstrelan, smustgrave: Wrong return type in Renderer::ensureMarkupIsSafe()

merge-requests/5889/merge
Alex Pott 2024-02-29 00:05:27 +00:00
parent 4d5abf7f08
commit e65cc2e481
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 5 additions and 4 deletions

View File

@ -810,10 +810,11 @@ class Renderer implements RendererInterface {
* @param array $elements * @param array $elements
* A render array with #markup set. * A render array with #markup set.
* *
* @return \Drupal\Component\Render\MarkupInterface|string * @return array
* The escaped markup wrapped in a Markup object. If $elements['#markup'] * The given array with the escaped markup wrapped in a Markup object.
* is an instance of \Drupal\Component\Render\MarkupInterface, it won't be * If $elements['#markup'] is an instance of
* escaped or filtered again. * \Drupal\Component\Render\MarkupInterface, it won't be escaped or filtered
* again.
* *
* @see \Drupal\Component\Utility\Html::escape() * @see \Drupal\Component\Utility\Html::escape()
* @see \Drupal\Component\Utility\Xss::filter() * @see \Drupal\Component\Utility\Xss::filter()