diff --git a/core/includes/form.inc b/core/includes/form.inc index 84f4b14..754132a 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -859,20 +859,22 @@ function template_preprocess_select(&$variables) { * An associative array containing the following key-value pairs: * - #multiple: Optional Boolean indicating if the user may select more than * one item. - * - #options: A associative array of options to render as HTML. Each array - * value can be a string, array, or an object with an 'option' property: - * - A string or integer key mapped to a translated string is interpreted as - * a single HTML option element. Do not use placeholders to sanitize data: - * doing so will lead to double-escaping. Note that the key will be visible - * in the HTML and could be modified by malicious users, so don't put - * sensitive information in it and sanitize it before use. - * - A translated string key mapped to an array indicates a group of + * - #options: An associative array of options to render as HTML. Each array + * value can be a string, an array, or an object with an 'option' property: + * - A string or integer key whose value is a translated string is + * interpreted as a single HTML option element. Do not use placeholders + * which sanitize data: doing so will lead to double-escaping. Note that the + * key will be visible in the HTML and could be modified by malicious users, + * so don't put sensitive information in it and sanitize it before use if + * based on user input. + * - A translated string key whose value is an array indicates a group of * options. The translated string is used as the label attribute for the * optgroup. Do not use placeholders to sanitize data: doing so will lead to - * double-escaping. The array should contain the options you wish to group. + * double-escaping. The array should contain the options you wish to group + * and should follow the syntax of $element['#options']. * Groups are output as HTML optgroup elements. - * - If the function encounters a string or integer key mapped to an object - * with an 'option' property, the key is ignored, the contents of the + * - If the function encounters a string or integer key whose value is an + * object with an 'option' property, the key is ignored, the contents of the * option property are interpreted as $element['#options'], and the * resulting HTML is added to the output. * - #value: Optional integer, string, or array representing which option(s)