diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php
index 892f069..d4bf13e 100644
--- a/core/lib/Drupal/Component/Utility/Html.php
+++ b/core/lib/Drupal/Component/Utility/Html.php
@@ -338,54 +338,14 @@ public static function escapeCdataElement(\DOMNode $node, $comment_start = '//',
    * "&lt;", not "<"). Be careful when using this function, as it will revert
    * previous sanitization efforts (&lt;script&gt; will become <script>).
    *
-   * This method is not the opposite of Html::escape(). For example, this method
-   * will convert "&eacute;" to "é", whereas Html::escape() will not convert "é"
-   * to "&eacute;".
-   *
    * @param string $text
    *   The text to decode entities in.
    *
    * @return string
    *   The input $text, with all HTML entities decoded once.
-   *
-   * @see html_entity_decode()
-   * @see \Drupal\Component\Utility\Html::escape()
    */
   public static function decodeEntities($text) {
     return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
   }
 
-  /**
-   * Escapes text by converting special characters to HTML entities.
-   *
-   * This method escapes HTML for sanitization purposes by replacing the
-   * following special characters with their HTML entity equivalents:
-   * - & (ampersand) becomes &amp;
-   * - " (double quote) becomes &quot;
-   * - ' (single quote) becomes &#039;
-   * - < (less than) becomes &lt;
-   * - > (greater than) becomes &gt;
-   * Special characters that have already been escaped will be double-escaped
-   * (for example, "&lt;" becomes "&amp;lt;").
-   *
-   * This method is not the opposite of Html::decodeEntities(). For example,
-   * this method will not encode "é" to "&eacute;", whereas
-   * Html::decodeEntities() will convert all HTML entities to UTF-8 bytes,
-   * including "&eacute;" and "&lt;" to "é" and "<".
-   *
-   * @param string $text
-   *   The input text.
-   *
-   * @return string
-   *   The text with all HTML special characters converted.
-   *
-   * @see htmlspecialchars()
-   * @see \Drupal\Component\Utility\Html::decodeEntities()
-   *
-   * @ingroup sanitization
-   */
-  public static function escape($text) {
-    return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
-  }
-
 }
diff --git a/core/lib/Drupal/Component/Utility/SafeMarkup.php b/core/lib/Drupal/Component/Utility/SafeMarkup.php
index 2fb5152..af9170d 100644
--- a/core/lib/Drupal/Component/Utility/SafeMarkup.php
+++ b/core/lib/Drupal/Component/Utility/SafeMarkup.php
@@ -223,7 +223,7 @@ public static function getAll() {
    * @see drupal_validate_utf8()
    */
   public static function checkPlain($text) {
-    $string = Html::escape($text);
+    $string = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
     static::$safeStrings[$string]['html'] = TRUE;
     return $string;
   }
diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
index 8a96311..195dc6e 100644
--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\Core\Render\Element;
 
-use Drupal\Component\Utility\Html as HtmlUtility;
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Render\SafeString;
 use Drupal\Component\Utility\Xss;
@@ -79,7 +78,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 = HtmlUtility::escape($element['#tag']);
+    $escaped_tag = htmlspecialchars($element['#tag'], ENT_QUOTES, 'UTF-8');
     $markup = '<' . $escaped_tag . $attributes;
     // Construct a void element.
     if (in_array($element['#tag'], self::$voidElements)) {
diff --git a/core/lib/Drupal/Core/Template/Attribute.php b/core/lib/Drupal/Core/Template/Attribute.php
index 8fe6788..ff01040 100644
--- a/core/lib/Drupal/Core/Template/Attribute.php
+++ b/core/lib/Drupal/Core/Template/Attribute.php
@@ -40,9 +40,7 @@
  * @endcode
  *
  * The attribute keys and values are automatically sanitized for output with
- * Html::escape() and the entire attribute string is marked safe for output.
- *
- * @see \Drupal\Component\Utility\Html::escape()
+ * htmlspecialchars() and the entire attribute string is marked safe for output.
  */
 class Attribute implements \ArrayAccess, \IteratorAggregate, SafeStringInterface {
 
diff --git a/core/lib/Drupal/Core/Template/AttributeArray.php b/core/lib/Drupal/Core/Template/AttributeArray.php
index 96aae69..cc3897f 100644
--- a/core/lib/Drupal/Core/Template/AttributeArray.php
+++ b/core/lib/Drupal/Core/Template/AttributeArray.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Template;
 
-use Drupal\Component\Utility\Html;
-
 /**
  * A class that defines a type of Attribute that can be added to as an array.
  *
@@ -76,7 +74,7 @@ public function offsetExists($offset) {
   public function __toString() {
     // Filter out any empty values before printing.
     $this->value = array_unique(array_filter($this->value));
-    return Html::escape(implode(' ', $this->value));
+    return htmlspecialchars(implode(' ', $this->value), ENT_QUOTES, 'UTF-8');
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Template/AttributeBoolean.php b/core/lib/Drupal/Core/Template/AttributeBoolean.php
index b06fd6d..7ff67ae 100644
--- a/core/lib/Drupal/Core/Template/AttributeBoolean.php
+++ b/core/lib/Drupal/Core/Template/AttributeBoolean.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Template;
 
-use Drupal\Component\Utility\Html;
-
 /**
  * A class that defines a type of boolean HTML attribute.
  *
@@ -42,7 +40,7 @@ public function render() {
    * Implements the magic __toString() method.
    */
   public function __toString() {
-    return $this->value === FALSE ? '' : Html::escape($this->name);
+    return $this->value === FALSE ? '' : htmlspecialchars($this->name, ENT_QUOTES, 'UTF-8');
   }
 
 }
diff --git a/core/lib/Drupal/Core/Template/AttributeString.php b/core/lib/Drupal/Core/Template/AttributeString.php
index 4f131b0..2dff59b 100644
--- a/core/lib/Drupal/Core/Template/AttributeString.php
+++ b/core/lib/Drupal/Core/Template/AttributeString.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Template;
 
-use Drupal\Component\Utility\Html;
-
 /**
  * A class that represents most standard HTML attributes.
  *
@@ -30,7 +28,7 @@ class AttributeString extends AttributeValueBase {
    * Implements the magic __toString() method.
    */
   public function __toString() {
-    return Html::escape($this->value);
+    return htmlspecialchars($this->value, ENT_QUOTES, 'UTF-8');
   }
 
 }
diff --git a/core/lib/Drupal/Core/Template/AttributeValueBase.php b/core/lib/Drupal/Core/Template/AttributeValueBase.php
index 0f4535a..c037004 100644
--- a/core/lib/Drupal/Core/Template/AttributeValueBase.php
+++ b/core/lib/Drupal/Core/Template/AttributeValueBase.php
@@ -6,7 +6,6 @@
  */
 
 namespace Drupal\Core\Template;
-use Drupal\Component\Utility\Html;
 
 /**
  * Defines the base class for an attribute type.
@@ -56,7 +55,7 @@ public function __construct($name, $value) {
   public function render() {
     $value = (string) $this;
     if (isset($this->value) && static::RENDER_EMPTY_ATTRIBUTE || !empty($value)) {
-      return Html::escape($this->name) . '="' . $value . '"';
+      return htmlspecialchars($this->name, ENT_QUOTES, 'UTF-8') . '="' . $value . '"';
     }
   }
 
diff --git a/core/modules/aggregator/src/Tests/AggregatorTestBase.php b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
index 312a0b1..3bee7f4 100644
--- a/core/modules/aggregator/src/Tests/AggregatorTestBase.php
+++ b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
@@ -8,7 +8,6 @@
 namespace Drupal\aggregator\Tests;
 
 use Drupal\aggregator\Entity\Feed;
-use Drupal\Component\Utility\Html;
 use Drupal\simpletest\WebTestBase;
 use Drupal\aggregator\FeedInterface;
 
@@ -244,7 +243,7 @@ public function uniqueFeed($feed_name, $feed_url) {
   public function getValidOpml(array $feeds) {
     // Properly escape URLs so that XML parsers don't choke on them.
     foreach ($feeds as &$feed) {
-      $feed['url[0][value]'] = Html::escape($feed['url[0][value]']);
+      $feed['url[0][value]'] = htmlspecialchars($feed['url[0][value]']);
     }
     /**
      * Does not have an XML declaration, must pass the parser.
diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js
index edc953b..d6157e7 100644
--- a/core/modules/block/js/block.js
+++ b/core/modules/block/js/block.js
@@ -88,57 +88,35 @@
           // back to from where the user tried to drag it.
           regionField.trigger('change');
         }
-
-        // Update region and weight fields if the region has been changed.
-        if (!regionField.is('.block-region-' + regionName)) {
+        else if ($rowElement.prev('tr').is('.region-message')) {
           var weightField = $rowElement.find('select.block-weight');
           var oldRegionName = weightField[0].className.replace(/([^ ]+[ ]+)*block-weight-([^ ]+)([ ]+[^ ]+)*/, '$2');
-          regionField.removeClass('block-region-' + oldRegionName).addClass('block-region-' + regionName);
-          weightField.removeClass('block-weight-' + oldRegionName).addClass('block-weight-' + regionName);
-          regionField.val(regionName);
-        }
 
-        updateBlockWeights(table, regionName);
+          if (!regionField.is('.block-region-' + regionName)) {
+            regionField.removeClass('block-region-' + oldRegionName).addClass('block-region-' + regionName);
+            weightField.removeClass('block-weight-' + oldRegionName).addClass('block-weight-' + regionName);
+            regionField.val(regionName);
+          }
+        }
       };
 
       // Add the behavior to each region select list.
-      $(context).find('select.block-region-select').once('block-region-select')
-        .on('change', function (event) {
+      $(context).find('select.block-region-select').once('block-region-select').each(function () {
+        $(this).on('change', function (event) {
           // Make our new row and select field.
           var row = $(this).closest('tr');
           var select = $(this);
+          tableDrag.rowObject = new tableDrag.row(row);
 
           // Find the correct region and insert the row as the last in the region.
           table.find('.region-' + select[0].value + '-message').nextUntil('.region-message').eq(-1).before(row);
 
-          updateBlockWeights(table, select[0].value);
           // Modify empty regions with added or removed fields.
           checkEmptyRegions(table, row);
           // Remove focus from selectbox.
           select.trigger('blur');
         });
-
-      /**
-       * Update block weights in the given region.
-       *
-       * @param {jQuery} $table
-       *   Table with draggable items.
-       * @param {string} region
-       *   Machine name of region containing blocks to update.
-       */
-      var updateBlockWeights = function ($table, region) {
-        // Calculate minimum weight.
-        var weight = -Math.round($table.find('.draggable').length / 2);
-        // Update the block weights.
-        $table.find('.region-' + region + '-message').nextUntil('.region-title')
-          .find('select.block-weight').val(function () {
-            // Increment the weight before assigning it to prevent using the
-            // absolute minimum available weight. This way we always have an
-            // unused upper and lower bound, which makes manually setting the
-            // weights easier for users who prefer to do it that way.
-            return ++weight;
-          });
-      };
+      });
 
       var checkEmptyRegions = function (table, rowObject) {
         table.find('tr.region-message').each(function () {
diff --git a/core/modules/system/src/Tests/Menu/LocalActionTest.php b/core/modules/system/src/Tests/Menu/LocalActionTest.php
index cd6dc81..468cbbb 100644
--- a/core/modules/system/src/Tests/Menu/LocalActionTest.php
+++ b/core/modules/system/src/Tests/Menu/LocalActionTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\system\Tests\Menu;
 
-use Drupal\Component\Utility\Html;
 use Drupal\Core\Url;
 use Drupal\simpletest\WebTestBase;
 
@@ -31,8 +30,8 @@ public function testLocalAction() {
     // Ensure that both menu and route based actions are shown.
     $this->assertLocalAction([
       [Url::fromRoute('menu_test.local_action4'), 'My dynamic-title action'],
-      [Url::fromRoute('menu_test.local_action4'), Html::escape("<script>alert('Welcome to the jungle!')</script>")],
-      [Url::fromRoute('menu_test.local_action4'), Html::escape("<script>alert('Welcome to the derived jungle!')</script>")],
+      [Url::fromRoute('menu_test.local_action4'), htmlspecialchars("<script>alert('Welcome to the jungle!')</script>", ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')],
+      [Url::fromRoute('menu_test.local_action4'), htmlspecialchars("<script>alert('Welcome to the derived jungle!')</script>", ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8')],
       [Url::fromRoute('menu_test.local_action2'), 'My hook_menu action'],
       [Url::fromRoute('menu_test.local_action3'), 'My YAML discovery action'],
       [Url::fromRoute('menu_test.local_action5'), 'Title override'],
diff --git a/core/modules/system/src/Tests/Menu/LocalTasksTest.php b/core/modules/system/src/Tests/Menu/LocalTasksTest.php
index 1a0ce81..cb6b529 100644
--- a/core/modules/system/src/Tests/Menu/LocalTasksTest.php
+++ b/core/modules/system/src/Tests/Menu/LocalTasksTest.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\system\Tests\Menu;
 
-use Drupal\Component\Utility\Html;
 use Drupal\Core\Url;
 use Drupal\simpletest\WebTestBase;
 
@@ -79,9 +78,9 @@ public function testPluginLocalTask() {
     ]);
 
     // Verify that script tags are escaped on output.
-    $title = Html::escape("Task 1 <script>alert('Welcome to the jungle!')</script>");
+    $title = htmlspecialchars("Task 1 <script>alert('Welcome to the jungle!')</script>", ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
     $this->assertLocalTaskAppers($title);
-    $title = Html::escape("<script>alert('Welcome to the derived jungle!')</script>");
+    $title = htmlspecialchars("<script>alert('Welcome to the derived jungle!')</script>", ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
     $this->assertLocalTaskAppers($title);
 
     // Verify that local tasks appear as defined in the router.
@@ -93,7 +92,7 @@ public function testPluginLocalTask() {
       ['menu_test.local_task_test_tasks_settings_dynamic', []],
     ]);
 
-    $title = Html::escape("<script>alert('Welcome to the jungle!')</script>");
+    $title = htmlspecialchars("<script>alert('Welcome to the jungle!')</script>", ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
     $this->assertLocalTaskAppers($title);
 
     // Ensure the view tab is active.
diff --git a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
index a8f2614..0addf3c 100644
--- a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
@@ -259,54 +259,4 @@ public function providerDecodeEntities() {
     );
   }
 
-  /**
-   * Tests Html::escape().
-   *
-   * @dataProvider providerEscape
-   * @covers ::escape
-   */
-  public function testEscape($expected, $text) {
-    $this->assertEquals($expected, Html::escape($text));
-  }
-
-  /**
-   * Data provider for testEscape().
-   *
-   * @see testCheckPlain()
-   */
-  public function providerEscape() {
-    return array(
-      array('Drupal', 'Drupal'),
-      array('&lt;script&gt;', '<script>'),
-      array('&amp;lt;script&amp;gt;', '&lt;script&gt;'),
-      array('&amp;#34;', '&#34;'),
-      array('&quot;', '"'),
-      array('&amp;quot;', '&quot;'),
-      array('&#039;', "'"),
-      array('&amp;#039;', '&#039;'),
-      array('©', '©'),
-      array('→', '→'),
-      array('➼', '➼'),
-      array('€', '€'),
-    );
-  }
-
-  /**
-   * Tests relationship between escaping and decoding HTML entities.
-   *
-   * @covers ::decodeEntities
-   * @covers ::escape
-   */
-  public function testDecodeEntitiesAndEscape() {
-    $string = "<em>répét&eacute;</em>";
-    $escaped = Html::escape($string);
-    $this->assertSame('&lt;em&gt;répét&amp;eacute;&lt;/em&gt;', $escaped);
-    $decoded = Html::decodeEntities($escaped);
-    $this->assertSame('<em>répét&eacute;</em>', $decoded);
-    $decoded = Html::decodeEntities($decoded);
-    $this->assertSame('<em>répété</em>', $decoded);
-    $escaped = Html::escape($decoded);
-    $this->assertSame('&lt;em&gt;répété&lt;/em&gt;', $escaped);
-  }
-
 }
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index 310c3df..de085ff 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -5,7 +5,6 @@
  * Handles integration of Twig templates with the Drupal theme system.
  */
 
-use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Render\SafeString;
 use Drupal\Core\Extension\Extension;
@@ -76,7 +75,7 @@ function twig_render_template($template_file, array $variables) {
   }
   if ($twig_service->isDebug()) {
     $output['debug_prefix'] .= "\n\n<!-- THEME DEBUG -->";
-    $output['debug_prefix'] .= "\n<!-- THEME HOOK: '" . Html::escape($variables['theme_hook_original']) . "' -->";
+    $output['debug_prefix'] .= "\n<!-- THEME HOOK: '" . htmlspecialchars($variables['theme_hook_original'], ENT_QUOTES, 'UTF-8') . "' -->";
     // If there are theme suggestions, reverse the array so more specific
     // suggestions are shown first.
     if (!empty($variables['theme_hook_suggestions'])) {
@@ -110,10 +109,10 @@ function twig_render_template($template_file, array $variables) {
         $prefix = ($template == $current_template) ? 'x' : '*';
         $suggestion = $prefix . ' ' . $template;
       }
-      $output['debug_info'] .= "\n<!-- FILE NAME SUGGESTIONS:\n   " . Html::escape(implode("\n   ", $suggestions)) . "\n-->";
+      $output['debug_info'] .= "\n<!-- FILE NAME SUGGESTIONS:\n   " . htmlspecialchars(implode("\n   ", $suggestions), ENT_QUOTES, 'UTF-8') . "\n-->";
     }
-    $output['debug_info']   .= "\n<!-- BEGIN OUTPUT from '" . Html::escape($template_file) . "' -->\n";
-    $output['debug_suffix'] .= "\n<!-- END OUTPUT from '" . Html::escape($template_file) . "' -->\n\n";
+    $output['debug_info']   .= "\n<!-- BEGIN OUTPUT from '" . htmlspecialchars($template_file, ENT_QUOTES, 'UTF-8') . "' -->\n";
+    $output['debug_suffix'] .= "\n<!-- END OUTPUT from '" . htmlspecialchars($template_file, ENT_QUOTES, 'UTF-8') . "' -->\n\n";
   }
   // This output has already been rendered and is therefore considered safe.
   return SafeString::create(implode('', $output));
