From 095af28e4b5d68bf64a0e666079856c8f41ea16b Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Fri, 15 Sep 2023 01:31:39 +0300 Subject: [PATCH] Fix HTML error printing properly --- authentic.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/authentic.pl b/authentic.pl index 553c3620d..76095d3e9 100644 --- a/authentic.pl +++ b/authentic.pl @@ -1579,11 +1579,11 @@ sub theme_error &header($text{'error'}, "") if (!$main_header); my $error_what = ($main::whatfailed ? "$main::whatfailed : " : ""); my $error_message = join(", ", @err_msg); + my $main_web = $main::webmin_script_type eq 'web'; $err_caller = " " . &ui_help($err_caller) - if ($err_caller); + if ($err_caller && $main_web); my $error = $error_what . $error_message . $err_caller; - $error = html_escape(html_strip(($error_what . $error_message))) . $err_caller - if ($main::webmin_script_type ne 'web'); + $error = &html_strip($error_what . $error_message . $err_caller) if (!$main_web); my $get_error_stack = sub { # Show call stack my $error_stack = "";