Passing in HTML as a shortcode parameter

I’m trying to pass in a link (anchor element) as a parameter to a shortcode. I want it to be rendered as an actual link on my website instead of a raw string:
Screenshot 2021-03-31 at 17.34.23
Is this possible to do?

My markdown looks like the following:

{{< videofigure class="hangman-gif-figure" caption=`Here is the finished app which is available on the <a href="" target="_blank">Play Store</a>` >}}
        {{< video src="hangman-finished-app.mp4" class="video-fluid" >}}
{{< /videofigure >}}

and videofigure.html looks like this:

<figure class="figure {{.Get "class"}}">
    <figcaption class="figure-caption text-center">{{.Get "caption"}}</figcaption>

I hope this makes sense! I’m a first timer poster here :blush:

safeHTML the caption

<figcaption class="figure-caption text-center">{{.Get "caption" | safeHTML }}</figcaption>
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.