diff --git a/core/lib/Drupal/Component/Utility/SafeMarkup.php b/core/lib/Drupal/Component/Utility/SafeMarkup.php index bcb6722..bc725c7 100644 --- a/core/lib/Drupal/Component/Utility/SafeMarkup.php +++ b/core/lib/Drupal/Component/Utility/SafeMarkup.php @@ -17,7 +17,7 @@ * * Strings sanitized by self::checkPlain(), self::xssFilter() or * self::xssFilterAdmin() are automatically marked safe, as are markup strings - * created from render arrays via drupal_render(). + * created from @link theme_render render arrays @endlink via drupal_render(). * * This class should be limited to internal use only. Module developers should * instead use the appropriate @@ -141,10 +141,10 @@ public static function escape($string) { /** * Applies a very permissive XSS/HTML filter for admin-only use. * - * Note: this methods only filters if $string is not marked safe already. + * Note: this method only filters if $string is not marked safe already. * - * @deprecated as of Drupal 8.0.x, will be removed before Drupal 8.0.0. Most - * calls can be removed. If the string used as part of a render array use + * @deprecated as of Drupal 8.0.x, will be removed before Drupal 8.0.0. If the + * string used as part of a @link theme_render render array @endlink use * #markup to allow the render system to filter automatically or just allow * the Twig to autoescape the value. If the result is not being used * directly in the rendering system (for example, when its result is being @@ -176,8 +176,9 @@ public static function checkAdminXss($string) { * browser. * * If you need to filter for admin use, like Xss::filterAdmin(), then: - * - If the string is used as part of a render array, use #markup to allow the - * render system to filter by the admin tag list automatically. + * - If the string is used as part of a @link theme_render render array @endlink, + * use #markup to allow the render system to filter by the admin tag list + * automatically. * - Otherwise, use the SafeMarkup::xssFilter() with tag list provided by * Xss::getAdminTagList() instead. * @@ -198,6 +199,8 @@ public static function checkAdminXss($string) { * An XSS safe version of $string, or an empty string if $string is not * valid UTF-8. The string is marked as safe. * + * @ingroup sanitization + * * @see \Drupal\Component\Utility\Xss::filter() * @see \Drupal\Component\Utility\Xss::filterAdmin() * @see \Drupal\Component\Utility\Xss::getAdminTagList() diff --git a/core/lib/Drupal/Component/Utility/Xss.php b/core/lib/Drupal/Component/Utility/Xss.php index 06c888a..a68ca2b 100644 --- a/core/lib/Drupal/Component/Utility/Xss.php +++ b/core/lib/Drupal/Component/Utility/Xss.php @@ -124,6 +124,8 @@ public static function filter($string, $html_tags = array('a', 'em', 'strong', ' * @return string * The filtered string. * + * @ingroup sanitization + * * @see \Drupal\Component\Utility\SafeMarkup::xssFilter() * @see \Drupal\Component\Utility\Xss::getAdminTagList() * diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index ef470d3..abd0a9b 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -654,7 +654,7 @@ public function addCacheableDependency(array &$elements, $dependency) { /** * Applies a very permissive XSS/HTML filter for admin-only use. * - * Note: this methods only filters if $string is not marked safe already. This + * Note: this method only filters if $string is not marked safe already. This * ensures that HTML intended for display is not filtered. * * @param string $string diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 732e27b..24673ee 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -802,7 +802,7 @@ function system_preprocess_block(&$variables) { } $variables['site_slogan'] = ''; if ($variables['content']['site_slogan']['#access'] && $variables['content']['site_slogan']['#markup']) { - $variables['site_slogan'] = $variables['content']['site_slogan']['#markup']; + $variables['site_slogan']['#markup'] = $variables['content']['site_slogan']['#markup']; } break;