Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.0.0-beta16
Description: 

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
Impacts: 
Module developers
Themers
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: 
Other updates done