Encoding an email address in a list block

Hello,

I noticed that an email address in a list block of a block field is rendered as a mailto link without encoding. I would like to encode the email address to prevent spam. Adding the email address to an email field or some other kind of field is not supported because it is part of a regular text. How can I envoke Kirby 3’s email protection method on the already parsed email addresses without parsing them again? A hook or overriding the snippet won’t help here I think.

Thank you.

Best Regards,

I don’t think there is a built-in way to do that. You could do some string replacement when rendering the content in the block snippet.

Or you add them as KirbyText tags and render via the kirbytext() method.

1 Like

Thanks @texnixe! Changing the list block to a markdown block with kirbytext email syntax helped!