diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php
index 024bf5a..b071878 100644
--- a/core/lib/Drupal/Core/Database/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Install/Tasks.php
@@ -8,7 +8,6 @@
 namespace Drupal\Core\Database\Install;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\Component\Utility\String;
 use Drupal\Core\Database\Database;
 
 /**
@@ -148,14 +147,18 @@ public function runTasks() {
         }
       }
     }
-    // Check for failed results and compile message
-    $message = '';
+    // Check for failed results and compile message array.
+    $messages = array();
     foreach ($this->results as $result => $success) {
       if (!$success) {
-        $message = SafeMarkup::isSafe($result) ? $result : String::checkPlain($result);
+        $messages[] = SafeMarkup::escape($result);
       }
     }
-    if (!empty($message)) {
+    if (!empty($messages)) {
+      $message = '';
+      foreach ($messages as $value) {
+        $message .= '<p class="error">' . $value . '</p>';
+      }
       $message = SafeMarkup::set('Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="http://drupal.org/getting-started/install">installation handbook</a>, or contact your hosting provider.' . $message);
       throw new TaskException($message);
     }
