diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php
index 5456cfa..90bd727 100644
--- a/core/lib/Drupal/Component/Utility/Html.php
+++ b/core/lib/Drupal/Component/Utility/Html.php
@@ -276,6 +276,17 @@ public static function load($html) {
 <body>!html</body>
 </html>
 EOD;
+
+    $htmlfix = preg_replace_callback(
+        '@(?<=<script)(.+?)(?=</script>)@is',
+        create_function('$match', 'return str_replace("<", "〈⸮", $match[0]);'), 
+        $html
+    );
+    $is_scriptfix = $htmlfix != $html;
+    if($is_scriptfix) {
+      $html = $htmlfix;
+    }
+
     // PHP's \DOMDocument serialization adds extra whitespace when the markup
     // of the wrapping document contains newlines, so ensure we remove all
     // newlines before injecting the actual HTML body to be processed.
@@ -285,6 +296,25 @@ public static function load($html) {
     // Ignore warnings during HTML soup loading.
     @$dom->loadHTML($document);
 
+    if($is_scriptfix) {
+      $body = $dom->getElementsByTagName('body')->item(0);
+      if ($body !== NULL) {
+        foreach ($body->getElementsByTagName('script') as $script) {
+          foreach ($script->childNodes as $child) {
+            $is_datasection = $child instanceof \DOMCdataSection;
+            $is_stub = strpos($child->data, '〈⸮') !== FALSE;
+            if ($is_datasection && $is_stub) {
+              $data = str_replace("〈⸮", "<", $child->data);
+              $fragment = $script->ownerDocument->createDocumentFragment();
+              $fragment->appendXML($data);
+              $script->appendChild($fragment);
+              $script->removeChild($child);
+            }
+          }
+        }
+      }
+    }
+
     return $dom;
   }
 
diff --git a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
index 6a106c7..b9d950f 100644
--- a/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
@@ -339,6 +339,20 @@ public function testTransformRootRelativeUrlsToAbsoluteAssertion($scheme_and_hos
   }
 
   /**
+   * Tests Html::load().
+   *
+   * Resolves an issue where a <script> tag contains html tags
+   *
+   * @covers ::load
+   */
+  public function testSciprtTagParsing() {
+    $html = '<script><b>Test</b></script>';
+    $dom = Html::load($html);
+    $result = $dom->saveHTML();
+    $this->assertContains($html, $result, '<script> parsing');
+  }
+
+  /**
    * Provides test data for testTransformRootRelativeUrlsToAbsolute().
    *
    * @return array
