Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is my patch for added roles to name (title's attribute).
Comment | File | Size | Author |
---|---|---|---|
#2 | title_added-2355069-1.patch | 1.24 KB | NerOcrO |
Comments
Comment #1
andypostthis is not a right way to display role names.
use a kind of
$role_options = array_map('check_plain', user_roles());
Comment #2
NerOcrO CreditAttribution: NerOcrO commentedAnd now?
Comment #3
NerOcrO CreditAttribution: NerOcrO commentedComment #4
andypostroles could be added via UI so needs sanitization, check core for usage of the role names
Comment #5
NerOcrO CreditAttribution: NerOcrO commentedYes, the t() function sanitize this variable : http://cgit.drupalcode.org/drupal/tree/includes/bootstrap.inc?h=7.x#n1466.
More specifically, format_string().
Comment #6
NerOcrO CreditAttribution: NerOcrO commented