diff --git a/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php b/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
index 1d7592b..5bb956a 100644
--- a/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
+++ b/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
@@ -37,6 +37,10 @@
    * Translates a string to the current language or to a given language.
    *
    * See the t() documentation for details.
+   *
+   * It is important never to call $this->t($user_text) where $user_text is
+   * some text that a user entered - doing that can lead to cross-site
+   * scripting and other security problems.
    */
   protected function t($string, array $args = array(), array $options = array()) {
     return $this->getStringTranslation()->translate($string, $args, $options);
diff --git a/core/lib/Drupal/Core/StringTranslation/TranslationManager.php b/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
index c653dad..206e517 100644
--- a/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
+++ b/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
@@ -142,6 +142,9 @@ public function getStringTranslation($langcode, $string, $context) {
   public function translate($string, array $args = array(), array $options = array()) {
     $string = $this->doTranslate($string, $options);
     if (empty($args)) {
+      // This is assumed to be safe because translate should only be called
+      // with strings defined in code.
+      // @see \Drupal\Core\StringTranslation\StringTranslationTrait::t()
       return SafeMarkup::set($string);
     }
     else {
