diff --git a/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php b/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
index 1d7592b..7bbe68e 100644
--- a/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
+++ b/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
@@ -36,6 +36,10 @@
   /**
    * Translates a string to the current language or to a given language.
    *
+   * It is important never to call 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.
+   *
    * See the t() documentation for details.
    */
   protected function t($string, array $args = array(), array $options = array()) {
diff --git a/core/lib/Drupal/Core/StringTranslation/TranslationManager.php b/core/lib/Drupal/Core/StringTranslation/TranslationManager.php
index c653dad..cd3207d 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
       return SafeMarkup::set($string);
     }
     else {
