From 7d985d597daa71ab67601400ea495247aea7fc3c Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon Date: Thu, 27 Feb 2014 14:42:53 -0800 Subject: [PATCH] Issue #2195749 by longwave: Fix up docs in String class --- core/lib/Drupal/Component/Utility/String.php | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/lib/Drupal/Component/Utility/String.php b/core/lib/Drupal/Component/Utility/String.php index 3cd6472f8b..affd4df05a 100644 --- a/core/lib/Drupal/Component/Utility/String.php +++ b/core/lib/Drupal/Component/Utility/String.php @@ -24,9 +24,9 @@ class String { * An HTML safe version of $text, or an empty string if $text is not * valid UTF-8. * - * @see drupal_validate_utf8() - * * @ingroup sanitization + * + * @see drupal_validate_utf8() */ public static function checkPlain($text) { return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); @@ -54,9 +54,9 @@ public static function decodeEntities($text) { * * This function replaces variable placeholders in a string with the requested * values and escapes the values so they can be safely displayed as HTML. It - * should be used on any unknown text that is intended to be printed to an HTML - * page (especially text that may have come from untrusted users, since in that - * case it prevents cross-site scripting and other security problems). + * should be used on any unknown text that is intended to be printed to an + * HTML page (especially text that may have come from untrusted users, since + * in that case it prevents cross-site scripting and other security problems). * * In most cases, you should use t() rather than calling this function * directly, since it will translate the text (on non-English-only sites) in @@ -66,9 +66,9 @@ public static function decodeEntities($text) { * A string containing placeholders. * @param $args * An associative array of replacements to make. Occurrences in $string of - * any key in $args are replaced with the corresponding value, after optional - * sanitization and formatting. The type of sanitization and formatting - * depends on the first character of the key: + * any key in $args are replaced with the corresponding value, after + * optional sanitization and formatting. The type of sanitization and + * formatting depends on the first character of the key: * - @variable: Escaped to HTML using String::checkPlain(). Use this as the * default choice for anything displayed on a page on the site. * - %variable: Escaped to HTML and formatted using String::placeholder(), @@ -79,12 +79,12 @@ public static function decodeEntities($text) { * String::checkPlain() previously, or is expected to contain some limited * HTML tags and has already been run through filter_xss() previously). * + * @return mixed + * The formatted string, or FALSE if no args specified. * - * @see t() * @ingroup sanitization * - * @return mixte - * The formatted string with placeholders inserted, or FALSE if no args specified. + * @see t() */ public static function format($string, array $args = array()) { // Transform arguments before inserting them. -- 2.22.0