summaryrefslogtreecommitdiff
path: root/app/Elements/EventsRecorded.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Elements/EventsRecorded.php')
-rw-r--r--app/Elements/EventsRecorded.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/Elements/EventsRecorded.php b/app/Elements/EventsRecorded.php
index 4ff3efe2bc..15e9ecc011 100644
--- a/app/Elements/EventsRecorded.php
+++ b/app/Elements/EventsRecorded.php
@@ -28,7 +28,9 @@ use Ramsey\Uuid\Uuid;
use function array_map;
use function explode;
use function implode;
+use function strpos;
use function strtoupper;
+use function trim;
use function view;
/**
@@ -101,7 +103,13 @@ class EventsRecorded extends AbstractElement
*/
public function canonical(string $value): string
{
- return strtoupper(strtr(parent::canonical($value), [' ' => '']));
+ $value = strtoupper(strtr(parent::canonical($value), [' ' => ',']));
+
+ while (strpos($value, ',,') !== false) {
+ $value = strtr($value, [',,' => ',']);
+ }
+
+ return trim($value, ',');
}
/**
@@ -163,7 +171,7 @@ class EventsRecorded extends AbstractElement
}
}
- return $tag;
+ return e($tag);
}, $tags);
return implode(I18N::$list_separator, $events);