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.
php_enable()
uses the following code:
drupal_set_message(t('A !php-code text format has been created.', array('!php-code' => l('PHP code', 'admin/config/content/formats/' . $php_format->format))));
In the documentation for t()
is reported the following text:
- Incorrect HTML in t():
$output .= t('<p>Go to the @contact-page.</p>', array('@contact-page' => l(t('contact page'), 'contact')));
- Correct HTML in t():
$output .= '<p>' . t('Go to the <a href="@contact-page">contact page</a>.', array('@contact-page' => url('contact'))) . '</p>';
Comment | File | Size | Author |
---|---|---|---|
#2 | 908772_incorrect_use_of_t_2.patch | 799 bytes | Sivaji_Ganesh_Jojodae |
Comments
Comment #1
apadernoComment #2
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedAgree with kiamlaluno. Attached patch will provide correct placeholder.
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis is exactly right.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.