Change record status: 
Introduced in branch: 
Introduced in version: 

In Drupal 7, !placeholder in t() or format_string() would result in the placeholder being used without alteration. In Drupal 8 we have enabled Twig auto-escape which means that doing this type of placeholdering is no longer supported as the result would not be safe for output as HTML.

Common usages of !placeholder in Drupal 7 and how to achieve it in Drupal 8:

  • Add a url to an href - see :placeholder for URLs
  • Generate plain text for use in non-HTML - see Output strategy
  • Because the input cannot possible contain anything that needs to be escaped - just use @placeholder
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done