login/list: join multiple names by ampersands
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 8 Jul 2018 15:25:38 +0000 (17:25 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Jul 2018 23:52:57 +0000 (01:52 +0200)
Encoded newlines are invisible in html.

auth.inc.php

index c8b6b319c74a347538456392a47cc093bdc143d7..772e256129c89abfbc01710fbd195ee8ba82b8d2 100644 (file)
@@ -16,7 +16,8 @@ class User
 
        function name()
        {
-               return @file_get_contents("{$this->dir}/name.txt");
+               $name = @file_get_contents("{$this->dir}/name.txt");
+               return htmlspecialchars(implode(' & ', explode("\n", $name)));
        }
 
        function admin()