diff --git a/library/config.php b/library/config.php
index a7c6c0e90..2adc68da4 100644
--- a/library/config.php
+++ b/library/config.php
@@ -21,7 +21,7 @@ $bb_cfg = [];
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
// Version info
-$bb_cfg['tp_version'] = 'v2.4.0-beta4';
+$bb_cfg['tp_version'] = 'v2.4.0-rc1';
$bb_cfg['tp_release_date'] = '14-11-2023';
$bb_cfg['tp_release_codename'] = 'Cattle';
@@ -91,7 +91,7 @@ $bb_cfg['server_port'] = !empty($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT
$bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name
// GZip
-$bb_cfg['gzip_compress'] = false; // compress output
+$bb_cfg['gzip_compress'] = false; // Compress output
// Tracker
$bb_cfg['announce_interval'] = 1800; // Announce interval (default: 1800)
@@ -138,10 +138,10 @@ $bb_cfg['dl_complete_days_keep'] = 180;
$bb_cfg['dl_cancel_days_keep'] = 30;
// Tor-Stats
-$bb_cfg['torstat_days_keep'] = 60; // days to keep user's per-torrent stats
+$bb_cfg['torstat_days_keep'] = 60; // Days to keep user's per-torrent stats
// Tor-Help
-$bb_cfg['torhelp_enabled'] = false; // find dead torrents (without seeder) that user might help seeding
+$bb_cfg['torhelp_enabled'] = false; // Find dead torrents (without seeder) that user might help seeding
// URL's
$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php
index 4ad0171af..0efe1e87e 100644
--- a/library/includes/init_bb.php
+++ b/library/includes/init_bb.php
@@ -321,6 +321,17 @@ function send_no_cache_headers()
header('Pragma: no-cache');
}
+/**
+ * Converts "
" tags to "\n" line breaks
+ *
+ * @param string $string
+ * @return string
+ */
+function br2nl(string $string): string
+{
+ return preg_replace('#
#i', "\n", $string);
+}
+
/**
* Adds commas between every group of thousands
*
diff --git a/src/Ajax.php b/src/Ajax.php
index 3232bdbee..df34a1e81 100644
--- a/src/Ajax.php
+++ b/src/Ajax.php
@@ -145,7 +145,7 @@ class Ajax
public function ajax_die(string $error_msg, int $error_code = E_AJAX_GENERAL_ERROR): void
{
$this->response['error_code'] = $error_code;
- $this->response['error_msg'] = strip_tags($error_msg);
+ $this->response['error_msg'] = strip_tags(br2nl($error_msg));
// Get caller info
if (!empty($_COOKIE['explain'])) {
@@ -258,7 +258,7 @@ class Ajax
}
$this->response['prompt_confirm'] = 1;
- $this->response['confirm_msg'] = strip_tags($confirm_msg);
+ $this->response['confirm_msg'] = strip_tags(br2nl($confirm_msg));
$this->send();
}