From 1cc0c1148e03ca576b732711ee199d940a5144a6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 18 Dec 2022 22:16:41 -0500 Subject: [PATCH] Skip blank lines in Tos module --- src/Module/Tos.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Module/Tos.php b/src/Module/Tos.php index 6109a2470f..348c8c1c5f 100644 --- a/src/Module/Tos.php +++ b/src/Module/Tos.php @@ -85,11 +85,13 @@ class Tos extends BaseModule if ($this->config->get('system', 'tosdisplay')) { $lines = trim($this->config->get('system', 'tosrules') ?: ''); if ($lines) { - $rules = "[list=1]"; + $rules = "[ol]"; foreach (explode("\n", $lines) as $line) { - $rules .= "\n[*]" . $line; + if (trim($line)) { + $rules .= "\n[*]" . trim($line); + } } - $rules .= "\n[/list]\n"; + $rules .= "\n[/ol]\n"; } else { $rules = ''; }