]> git.mxchange.org Git - friendica.git/commitdiff
Skip blank lines in Tos module
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 19 Dec 2022 03:16:41 +0000 (22:16 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 19 Dec 2022 03:16:41 +0000 (22:16 -0500)
src/Module/Tos.php

index 6109a2470fa86945393f496a228a041212f80465..348c8c1c5f5151ba03cf55a73fbddf991d957641 100644 (file)
@@ -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 = '';
                        }