From 6188a8777950ffeaa80593d815600c84911ac932 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 7 Dec 2015 23:36:49 +0100 Subject: [PATCH] [ticket/14344] Improve output of HTML errors trigged during install PHPBB3-14344 --- phpBB/phpbb/install/helper/iohandler/cli_iohandler.php | 4 ++++ phpBB/phpbb/install/helper/iohandler/iohandler_base.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php index 4d0341ef12..89f3594378 100644 --- a/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php +++ b/phpBB/phpbb/install/helper/iohandler/cli_iohandler.php @@ -125,6 +125,10 @@ class cli_iohandler extends iohandler_base { $this->io->newLine(); + if (strpos($error_title, '
') !== false) + { + $error_title = strip_tags(str_replace('
', "\n", $error_title)); + } $message = $this->translate_message($error_title, $error_description); $message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : ''); $this->io->error($message_string); diff --git a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php index 530cb4766b..8dee5390a9 100644 --- a/phpBB/phpbb/install/helper/iohandler/iohandler_base.php +++ b/phpBB/phpbb/install/helper/iohandler/iohandler_base.php @@ -101,6 +101,10 @@ abstract class iohandler_base implements iohandler_interface */ public function add_error_message($error_title, $error_description = false) { + if (strpos($error_title, '
') !== false) + { + $error_title = strip_tags(htmlspecialchars_decode($error_title)); + } $this->errors[] = $this->translate_message($error_title, $error_description); }