Commit a8f6641a authored by alexpott's avatar alexpott

Issue #2550945 followup by mbovan: Add Html::escape()

parent a5bfd122
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Render\Element;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Html as HtmlUtility;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Render\SafeString;
use Drupal\Component\Utility\Xss;
......@@ -79,7 +79,7 @@ public static function preRenderHtmlTag($element) {
// An HTML tag should not contain any special characters. Escape them to
// ensure this cannot be abused.
$escaped_tag = Html::escape($element['#tag']);
$escaped_tag = HtmlUtility::escape($element['#tag']);
$markup = '<' . $escaped_tag . $attributes;
// Construct a void element.
if (in_array($element['#tag'], self::$voidElements)) {
......
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