HTML entities not rendered into Kirby links text

Dear all,

I have a bug since I updated fro Kirby 2 to Kirby 3. When I use HTML entities in link text, as: (link: url text: →)

It outputs the raw code, and not the HTML entities.

Any ideas?

Option 1: Replace those entities with the normal characters
Option 2: Change the way the link text is rendered, because the text value is encoded, resulting in the string output of the entity.

Dear @texnixe, option 2 is definitely better for me. How can I process?
Thanks a lot

It’s a bit of work, because you would have to replace what the Html method inside the link tag does with some manual code that prevents this encoding.

I had the same issue and simply solved it with a kirbytags after hook.

'hooks' => [ 'kirbytags:after' => function ($text, array $data = [], array $options = []) {
//prevents rendering of html entities as string, e.g.  
$text = htmlspecialchars_decode($text);
return $text;

1 Like

Thanks a lot, it works!