format_string

format_string($string, array $args)

Formats a string for HTML display by replacing variable placeholders.

Deprecated

in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use \Drupal\Component\Render\FormattableMarkup.

See also

\Drupal\Component\Render\FormattableMarkup::placeholderFormat()

\Drupal\Component\Render\FormattableMarkup

t()

Related topics

Sanitization functions
Functions to sanitize values.

File

core/includes/bootstrap.inc, line 315
Functions that need to be loaded on every Drupal request.

Code

function format_string($string, array $args) {
  return SafeMarkup::format($string, $args);
}
doc_Drupal
2016-10-29 09:15:15
Comments
Leave a Comment

Please login to continue.