').
$text = trim(preg_replace('/' . $boundary . '(?:' . implode('|', $keys) . ')' . $boundary . '/iu', '\0', ' ' . $text . ' '));
- return Xss::filter($text, ['strong']);
+ return SafeMarkup::filterXss($text, ['strong']);
}
/**
diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php
index 240aea9..8232cb0 100644
--- a/core/modules/simpletest/src/AssertContentTrait.php
+++ b/core/modules/simpletest/src/AssertContentTrait.php
@@ -808,7 +808,7 @@ protected function assertNoTitle($title, $message = '', $group = 'Other') {
* TRUE on pass, FALSE on fail.
*/
protected function assertThemeOutput($callback, array $variables = array(), $expected = '', $message = '', $group = 'Other') {
- $output = \Drupal::theme()->render($callback, $variables);
+ $output = (string) \Drupal::theme()->render($callback, $variables);
$this->verbose(
'
' . 'Result:' . '' . SafeMarkup::checkPlain(var_export($output, TRUE)) . '
'
. '
' . 'Expected:' . '' . SafeMarkup::checkPlain(var_export($expected, TRUE)) . '
'
diff --git a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php
index c5ebaa5..f619bd1 100644
--- a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php
+++ b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php
@@ -7,6 +7,7 @@
namespace Drupal\system\Plugin\Block;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\ConfigFactoryInterface;
@@ -173,7 +174,7 @@ public function build() {
);
$build['site_slogan'] = array(
- '#markup' => Xss::filterAdmin($site_config->get('slogan')),
+ '#markup' => SafeMarkup::checkAdminXss($site_config->get('slogan')),
'#access' => $this->configuration['use_site_slogan'],
);
diff --git a/core/modules/system/templates/dropbutton-wrapper.html.twig b/core/modules/system/templates/dropbutton-wrapper.html.twig
index ca0ff7e..d4c8d90 100644
--- a/core/modules/system/templates/dropbutton-wrapper.html.twig
+++ b/core/modules/system/templates/dropbutton-wrapper.html.twig
@@ -12,7 +12,7 @@
* @ingroup themeable
*/
#}
-{% if children %}
+{% if children|length %}
{% spaceless %}