Commit 19854be6 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2873825 by josephcheek: Add Change record to @deprecated in SafeMarkup

parent 23ec4d59
......@@ -13,6 +13,8 @@
* @link sanitization sanitization functions @endlink or the @link theme_render theme and render systems @endlink
* so that the output can can be themed, escaped, and altered properly.
*
* @see https://www.drupal.org/node/2549395
*
* @see TwigExtension::escapeFilter()
* @see twig_render_template()
* @see sanitization
......@@ -34,6 +36,8 @@ class SafeMarkup {
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0.
* Instead, you should just check if a variable is an instance of
* \Drupal\Component\Render\MarkupInterface.
*
* @see https://www.drupal.org/node/2549395
*/
public static function isSafe($string, $strategy = 'html') {
return $string instanceof MarkupInterface;
......@@ -58,6 +62,7 @@ public static function isSafe($string, $strategy = 'html') {
* possible, \Drupal\Component\Utility\Html::escape() can be used in places
* where explicit escaping is needed.
*
* @see https://www.drupal.org/node/2549395
* @see drupal_validate_utf8()
*/
public static function checkPlain($text) {
......@@ -84,6 +89,8 @@ public static function checkPlain($text) {
*
* @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
* Use \Drupal\Component\Render\FormattableMarkup.
*
* @see https://www.drupal.org/node/2549395
*/
public static function format($string, array $args) {
return new FormattableMarkup($string, $args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment