Fix tag handling to support array format in Bludit

This commit is contained in:
interlope committed 2026-06-01 17:03:03 +02:00
1 parent 35ecc763ba
commit 79ae7eb884
1 file changed
+3 -2
+3 -2
View File
@@ -210,12 +210,13 @@ class pluginBluditGithub extends Plugin
// TinyMCE stores HTML — content() returns the full rendered content
$content = $page->content();
// Tags: getValue returns comma-separated string in Bludit
// Tags: getValue returns an array in Bludit
$rawTags = $page->getValue('tags');
$tagLines = '';
if (!empty($rawTags)) {
$tagArray = array_map('trim', explode(',', $rawTags));
$tagArray = is_array($rawTags) ? $rawTags : array_map('trim', explode(',', $rawTags));
foreach ($tagArray as $tag) {
$tag = trim((string)$tag);
if ($tag !== '') {
$tagLines .= "\n - " . $tag;
}