diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php index 83eef44..912f8c0 100644 --- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php +++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php @@ -9,7 +9,6 @@ use Drupal\Component\Utility\SafeMarkup; use Drupal\Core\Template\Attribute; -use Drupal\Component\Utility\String; /** * Provides a render element for any HTML tag, with properties and value. diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 637d7b1..4df9afd 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -16,7 +16,6 @@ use Drupal\Core\Controller\ControllerResolverInterface; use Drupal\Core\Theme\ThemeManagerInterface; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\String; use Symfony\Component\HttpFoundation\RequestStack; /** @@ -832,7 +831,7 @@ public function generateCachePlaceholder($callback, array &$context) { 'token' => Crypt::randomBytesBase64(55), ]; - return String::format('', array( + return SafeMarkup::format('', array( '@callback' => $callback, '@token' => $context['token'], )); diff --git a/core/modules/views/views.module b/core/modules/views/views.module index a140b49..9a3331d 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -674,7 +674,7 @@ function views_pre_render_views_form_views_form($element) { } // Apply substitutions to the rendered output. - $element['output'] = array('#markup' => String::replace($search, $replace, drupal_render($element['output']))); + $element['output'] = array('#markup' => SafeMarkup::replace($search, $replace, drupal_render($element['output']))); // Sort, render and add remaining form fields. $children = Element::children($element, TRUE); diff --git a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php index 864f209..146fcd1 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php @@ -189,13 +189,13 @@ function testPlaceholder() { } /** - * Tests String::replace(). + * Tests SafeMarkup::replace(). * * @dataProvider providerReplace * @covers ::replace */ public function testReplaces($search, $replace, $subject, $expected, $is_safe) { - $result = String::replace($search, $replace, $subject); + $result = SafeMarkup::replace($search, $replace, $subject); $this->assertEquals($expected, $result); $this->assertEquals($is_safe, SafeMarkup::isSafe($result)); }