diff --git a/core/lib/Drupal/Component/Utility/SafeMarkup.php b/core/lib/Drupal/Component/Utility/SafeMarkup.php index 4f11c49..60b3b35 100644 --- a/core/lib/Drupal/Component/Utility/SafeMarkup.php +++ b/core/lib/Drupal/Component/Utility/SafeMarkup.php @@ -85,7 +85,18 @@ public static function set($string, $strategy = 'html') { } /** - * @todo + * Remove a string from the list of safe strings. + * + * This can be used when preparing to actually print a string to conserve + * memory. + * + * @param string $string + * The string to be removed from the safe list. + * @param string $strategy + * The escaping strategy used for this string. Two values are supported + * by default: + * - 'html': (default) The string is safe for use in HTML code. + * - 'all': The string is safe for all use cases. */ public static function remove($string, $strategy = 'html') { $string = (string) $string; diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php index 25721bb..c2301cb 100644 --- a/core/modules/system/src/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php @@ -167,6 +167,9 @@ function testItemList() { $this->assertThemeOutput('item_list', $variables, $expected); } + /** + * Helper to set up variables for theme_links(). + */ protected function getVariables() { // Verify that a list of links is properly rendered. $variables = array();