Display tags as lowercase

dev
gravel 12 months ago
parent d3f1707f5c
commit 6fc91007a4
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -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;

@ -101,7 +101,7 @@
class="room-label <?=$tag->get_tag_classname()?> badge"
title="<?=$tag->description?>"
><?=
truncate($tag->text, 16)
truncate($tag->get_text(), 16)
?></span>
<?php endif; endforeach; ?>
</span>

Loading…
Cancel
Save