By alexpott on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
SafeMarkup::format()'s second parameter $args is now required.
Using SafeMarkup::format() without $args is unsupported because it potentially allows user supplied data to be considered safe. The first parameter $string should not be a variable.
new FormattableMarkup($string, $args) should be used to insert placeholders into a string.
Related change records
SafeMarkup::format() returns a FormattableMarkup object instead of a string
SafeMarkup methods are removed
See Twig autoescape enabled and text sanitization APIs updated for a full list of related change records.
Impacts:
Module developers
Themers