diff --git a/core/lib/Drupal/Core/Page/HtmlFragment.php b/core/lib/Drupal/Core/Page/HtmlFragment.php
index 18f587a..ad7bd56 100644
--- a/core/lib/Drupal/Core/Page/HtmlFragment.php
+++ b/core/lib/Drupal/Core/Page/HtmlFragment.php
@@ -174,7 +174,7 @@ public function getContent() {
* @param string $title
* Value to assign to the page title.
* @param int $output
- * (optional) normally should be left as Title::CHECK_PLAIN. Only set to
+ * (optional) normally should be left as Title::FILTER_XSS_ADMIN. Only set to
* Title::PASS_THROUGH if you have already removed any possibly dangerous
* code from $title using a function like
* \Drupal\Component\Utility\String::checkPlain() or
@@ -183,7 +183,7 @@ public function getContent() {
*
* @return $this
*/
- public function setTitle($title, $output = Title::CHECK_PLAIN) {
+ public function setTitle($title, $output = Title::FILTER_XSS_ADMIN) {
if ($output == Title::CHECK_PLAIN) {
$this->title = String::checkPlain($title);
}