diff --git a/php/utils/tags.php b/php/utils/tags.php index b83d5f6..42e7991 100644 --- a/php/utils/tags.php +++ b/php/utils/tags.php @@ -33,10 +33,17 @@ return strtolower($this->text); } + /** + * Returns a lowercase representation of the tag for use in display. + */ + public function get_text(): string { + return strtolower($this->text); + } + public function jsonSerialize(): mixed { // Only used for passing to DOM $details = get_object_vars($this); - $details['text'] = html_sanitize($details['text']); + $details['text'] = html_sanitize($this->get_text()); $details['description'] = html_sanitize($details['description']); $details['type'] = $this->get_tag_type(); return $details; diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index c7e62c3..5adf64b 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -101,7 +101,7 @@ class="room-label get_tag_classname()?> badge" title="description?>" >text, 16) + truncate($tag->get_text(), 16) ?>