diff --git a/core/lib/Drupal/Component/Utility/SafeMarkup.php b/core/lib/Drupal/Component/Utility/SafeMarkup.php
index af9170d..2d8ed9d 100644
--- a/core/lib/Drupal/Component/Utility/SafeMarkup.php
+++ b/core/lib/Drupal/Component/Utility/SafeMarkup.php
@@ -272,7 +272,7 @@ public static function checkPlain($text) {
*
* @see t()
*/
- public static function format($string, array $args = array()) {
+ public static function format($string, array $args) {
$safe = TRUE;
// Transform arguments before inserting them.
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php
index 054d101..4beb133 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php
@@ -114,7 +114,7 @@ public function set($property_name, $value, $notify = TRUE) {
*/
public function getProperties($include_computed = FALSE) {
if (!isset($this->entity)) {
- throw new MissingDataException(SafeMarkup::format('Unable to get properties as no entity has been provided.'));
+ throw new MissingDataException('Unable to get properties as no entity has been provided.');
}
if (!$this->entity instanceof FieldableEntityInterface) {
// @todo: Add support for config entities in
diff --git a/core/modules/filter/src/Plugin/Filter/FilterHtml.php b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
index dd39623..fbd18fe 100644
--- a/core/modules/filter/src/Plugin/Filter/FilterHtml.php
+++ b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
@@ -145,7 +145,7 @@ public function tips($long = FALSE) {
$rows[] = array(
array('data' => $tips[$tag][0], 'class' => array('description')),
array('data' => SafeMarkup::format('@var', array('@var' => $tips[$tag][1])), 'class' => array('type')),
- array('data' => SafeMarkup::format($tips[$tag][1]), 'class' => array('get'))
+ array('data' => ['#markup' => $tips[$tag][1]], 'class' => array('get'))
);
}
else {
@@ -176,7 +176,7 @@ public function tips($long = FALSE) {
$rows[] = array(
array('data' => $entity[0], 'class' => array('description')),
array('data' => SafeMarkup::format('@var', array('@var' => $entity[1])), 'class' => array('type')),
- array('data' => SafeMarkup::format($entity[1]), 'class' => array('get'))
+ array('data' => ['#markup' => $entity[1]], 'class' => array('get'))
);
}
$table = array(
diff --git a/core/modules/filter/src/Tests/FilterAdminTest.php b/core/modules/filter/src/Tests/FilterAdminTest.php
index 7e6a2d3..bd5d669 100644
--- a/core/modules/filter/src/Tests/FilterAdminTest.php
+++ b/core/modules/filter/src/Tests/FilterAdminTest.php
@@ -372,8 +372,8 @@ function testFilterTipHtmlEscape() {
// Therefore we test only some parts.
$link = '' . SafeMarkup::checkPlain(\Drupal::config('system.site')->get('name')) . '';
$ampersand = '&';
- $link_as_code = '' . $link . '';
- $ampersand_as_code = '' . $ampersand . '';
+ $link_as_code = '' . htmlspecialchars($link, ENT_QUOTES, 'UTF-8') . '';
+ $ampersand_as_code = '' . htmlspecialchars($ampersand, ENT_QUOTES, 'UTF-8') . '';
$this->drupalGet('filter/tips');
diff --git a/core/modules/system/tests/modules/menu_test/src/TestControllers.php b/core/modules/system/tests/modules/menu_test/src/TestControllers.php
index f3ff8d2..2a91286 100644
--- a/core/modules/system/tests/modules/menu_test/src/TestControllers.php
+++ b/core/modules/system/tests/modules/menu_test/src/TestControllers.php
@@ -57,7 +57,7 @@ public function testDefaults($placeholder = NULL) {
return ['#markup' => SafeMarkup::format("Sometimes there is a placeholder: '@placeholder'.", array('@placeholder' => $placeholder))];
}
else {
- return ['#markup' => SafeMarkup::format('Sometimes there is no placeholder.')];
+ return ['#markup' => 'Sometimes there is no placeholder.'];
}
}