From 79ae7eb884d4b3cd048d60709fd7d58d00adf343 Mon Sep 17 00:00:00 2001 From: interlope Date: Mon, 1 Jun 2026 17:03:03 +0200 Subject: [PATCH] Fix tag handling to support array format in Bludit --- plugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.php b/plugin.php index 3895d27..b568612 100644 --- a/plugin.php +++ b/plugin.php @@ -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; }