Tags not separated by coma ","

Dear Kirby Friends,

im trying to filter my blog post with the assigned tags. I want to use these tags with data-slug and data-categories. Therefore i need the tags to be separated by space not by comma.

<?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $note) : ?>
                <div class="post" data-categories="<?= $note->tags() ?>">
                    <cell-r span=2 span-s=row>  
                      <h3 >
                        <a href="<?= $note->url() ?>"><?= $note->title() ?></a>
                      </h3>
                    </cell-r>
                    <cell-r span=5-6 span-s=1-2>
                    <?php foreach ($note->tags()->split(',') as $tag): ?>
                        <p><?= $tag ?></p>
                      <?php endforeach ?>
                    </cell-r>
                    <cell-r span=1>
                      <p>Art-Direction</p>
                    </cell-r>
                    <cell-r span=1>
                      <div class="text-right">
                        <p><time><?= $note->date()->toDate('Y') ?></time></p>
                      </div>
                    </cell-r>

                  <hr>
                </div>
              <?php endforeach ?>

thanks for your help

Bildschirmfoto 2020-06-25 um 20.53.49

i also need advice on how to hide tags globally but use them as data-slugs

$tags = implode(' ', $note->tags()->split(','));

will return a string separated by spaces.