From 7f32367504defb6ae6bb2ab124fbe01a5ac53878 Mon Sep 17 00:00:00 2001 From: gravel Date: Thu, 21 Sep 2023 17:04:50 +0000 Subject: [PATCH] Improve description tag parsing --- php/servers/servers-rooms.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/servers/servers-rooms.php b/php/servers/servers-rooms.php index 99e282bc..241d7008 100644 --- a/php/servers/servers-rooms.php +++ b/php/servers/servers-rooms.php @@ -141,7 +141,7 @@ /** * Regular expression matching tags specified in the Community description. */ - private const DESCRIPTION_TAGS_SPECIFICATION = '/(#[^#()@., ]+(?:,?\s*|\s+|$))+\s*$/'; + private const DESCRIPTION_TAGS_SPECIFICATION = '/(#[^#()@., ]+(?:,?\s*|\s+|$))+\s*.?$/'; /** @@ -186,6 +186,7 @@ // Trim tags from description. $this->description = substr($this->description, 0, strpos($this->description, $tag_specification)); + $this->description = preg_replace('/\s*tags:\s*$/i', '', $this->description); } /**