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.
I ran
drush @mir urol 'event publisher' ajt143
And it spit out
Added the <em>event publisher</em> role to uid <em>8</em>
Thinking it shouldn't have the HTML in there.
Comments
Comment #1
vinmassaro CreditAttribution: vinmassaro commentedI'm seeing the same output:
The
dt()
function seems to generate this, as wrapping it instrip_tags()
fixes it. Are there some commands that output HTML, which is why this is in place?Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis is because %substitutions wrap the substituted text with html tags. This is only done if there is a bootstrapped Drupal site. For example:
The correct solution here is to find all occurrences of the dt() function that use % substitutions, and switch them to use !substitutions.
Comment #3
jonhattanDid proceed per #2.
Instead of strip_tags I'd like to see we #1162694: Switch from t() to gettext().