diff --git a/interface/main/backup.php b/interface/main/backup.php
index 3e8b16fb414..a8b07a9b076 100644
--- a/interface/main/backup.php
+++ b/interface/main/backup.php
@@ -500,8 +500,8 @@ function export_submit(step) {
}
if ($form_step == 1) {
- $form_status .= xla('Dumping OpenEMR database') . "...
";
- echo nl2br($form_status);
+ $form_status .= xl('Dumping OpenEMR database') . "...||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
if (file_exists($TAR_FILE_PATH)) {
if (! unlink($TAR_FILE_PATH)) {
die(xlt("Couldn't remove old backup file:") . " " . text($TAR_FILE_PATH));
@@ -546,8 +546,8 @@ function export_submit(step) {
}
if ($form_step == 3) {
- $form_status .= xla('Dumping OpenEMR web directory tree') . "...
";
- echo nl2br($form_status);
+ $form_status .= xl('Dumping OpenEMR web directory tree') . "...||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
$cur_dir = getcwd();
chdir($webserver_root);
@@ -588,8 +588,8 @@ function export_submit(step) {
}
if ($form_step == 5) { // create the final compressed tar containing all files
- $form_status .= xla('Backup file has been created. Will now send download.') . "
";
- echo nl2br($form_status);
+ $form_status .= xl('Backup file has been created. Will now send download.') . "||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
$cur_dir = getcwd();
chdir($BACKUP_DIR);
$file_list = array('.');
@@ -693,8 +693,8 @@ function export_submit(step) {
}
if ($tables || is_array($_POST['form_sel_lists'] ?? '') || is_array($_POST['form_sel_layouts'] ?? '')) {
- $form_status .= xla('Creating export file') . "...
";
- echo nl2br($form_status);
+ $form_status .= xl('Creating export file') . "...||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
if (file_exists($EXPORT_FILE)) {
if (! unlink($EXPORT_FILE)) {
die(xlt("Couldn't remove old export file: ") . text($EXPORT_FILE));
@@ -899,8 +899,8 @@ function export_submit(step) {
}
if ($form_step == 103) {
- $form_status .= xla('Done. Will now send download.') . "
";
- echo nl2br($form_status);
+ $form_status .= xl('Done. Will now send download.') . "||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
$auto_continue = true;
}
@@ -919,8 +919,8 @@ function export_submit(step) {
// Process uploaded config file.
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $EXPORT_FILE)) {
- $form_status .= xla('Applying') . "...
";
- echo nl2br($form_status);
+ $form_status .= xl('Applying') . "...||br-placeholder||";
+ echo brCustomPlaceholder(text($form_status));
$cmd = escapeshellcmd($mysql_cmd) . " -u " . escapeshellarg($sqlconf["login"]) .
" -p" . escapeshellarg($sqlconf["pass"]) .
" -h " . escapeshellarg($sqlconf["host"]) .
@@ -941,8 +941,8 @@ function export_submit(step) {
}
if ($form_step == 203) {
- $form_status .= xla('Done') . ".";
- echo nl2br($form_status);
+ $form_status .= xl('Done') . ".";
+ echo brCustomPlaceholder(text($form_status));
}
/// ViSolve : EventLog Backup
@@ -1026,7 +1026,7 @@ function export_submit(step) {
-
+
@@ -1090,6 +1090,13 @@ function export_submit(step) {
+// (this is because the nl2br was not working for a reason I couldn't figure out)
+function brCustomPlaceholder(string $str): string
+{
+ return str_replace("||br-placeholder||", "
", $str);
+}
+
// Recursive directory remove (like an O/S insensitive "rm -rf dirname")
function obliterate_dir($dir)
{