diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 26e7f5a..3998b88 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -111,11 +111,14 @@ function hook_user_cancel_methods_alter(&$methods) {
  * that is displayed. Can be used to ensure user privacy in situations where
  * $account->name is too revealing.
  *
- * @param string $name
+ * @param string|Drupal\Component\Utility\SafeStringInterface $name
  *   The string that $account->getDisplayName() will return.
+ *   Implementations are allowed to change it to either.
+ *   Can be auto-escaped if it is a string, and if it has trusted HTML content,
+ *   a SafeString object needs to be used.
  *
- * @param $account
- *   The account object passed to user_format_name().
+ * @param \Drupal\Core\Session\AccountInterface $account
+ *   The user object on which the operation is being performed.
  *
  * @see $account->getDisplayName()
  */
