Closed texnixe closed 5 years ago
Do you remember if we had the same behavior in v2? Just trying to find out if it's a regression.
Nope, in v2 it was escaped as well (and no KirbyText was rendered): https://github.com/getkirby-v2/kirby/blob/2.5.12/extensions/tags.php#L150 I wonder why the behavior is still different between v2 and v3.
Anker tags definitely worked in K2...
Making Markdown work would make sense, event though that didn't work in K2, either.
The second issue with the link tags not rendering can be fixed by providing an array as the second parameter to Html::figure()
method in kirby/config/tags.php
:
return Html::figure([ $link($image) ], [$tag->caption], [
'class' => $tag->class
]);
If we just pass a string, the string is html::encode()
d with the tags being stripped, line #376 kirby/src/toolkit/Html.php
If that's an acceptable solution, I have create a PR.
✅
Describe the bug When using markdown in a caption within an image KirbyTag e.g.
(image: myimage.jpg caption: This is an *awesome* image)
, it is not parsed but rendered as is.To Reproduce Steps to reproduce the behavior:
Expected behavior Markdown should be parsed
Kirby Version 3.0.2
And since we are at it: HTML tags within captions aren't rendered, either: https://forum.getkirby.com/t/tags-in-figcaption-in-kirby3/13038/2