By lauriii on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
Support for #plain_text has been added for the render arrays to output plain text.
Previously:
$stuff = "<script>alert('I am bad.')</script>";
$render = ['#markup' => Html::escape($stuff)]; // or previously SafeMarkup::checkPlain($stuff)
Now:
$stuff = "<script>alert('I am bad.')</script>";
$render = ['#plain_text' => $stuff];
Related change records
See Twig autoescape enabled and text sanitization APIs updated for a full list of related change records.
Impacts:
Module developers