Escaping curley for anchor tags

Hi I’m trying to preserve curley tags on output for href but it seems hugo automatically converts this. How can I format this to achieve expected result?

Original:

<a href="{{ "{{ system.viewAsWebpageLink }}" | htmlUnescape | safeHTML }}" target="_blank">
   {{ "{{ system.viewAsWebpageLink }}" | htmlUnescape | safeHTML }}"
</a>

Expected:

<a href="{{ system.viewAsWebpageLink }}" | htmlUnescape | safeHTML }}" target="_blank">
  {{ system.viewAsWebpageLink }}
</a>

Get:

<a href="%7b%7b%20system.viewAsWebpageLink%20%7d%7d" target="_blank">
  {{ system.viewAsWebpageLink }}
</a>

Just eye-balling it, you might want to switch quote marks:

<a href="{{ '{{ system.viewAsWebpageLink }}' | htmlUnescape | safeHTML }}" target="_blank">
   {{ "{{ system.viewAsWebpageLink }}" | htmlUnescape | safeHTML }}
</a>

I want to ask about your expected output. I don’t care about your motivation, I am just curious about why you want that output. It seems like having <a href="{{ system.viewAsWebpageLink }}" | htmlUnescape | safeHTML }}" target="_blank"> isn’t useful in HTML. Those piped commands are for Hugo. Is there a way to use them with JS as well?

Yeah the reason I need that to output is because I am building a modular marketo email template and that {{ system.viewAsWebpageLink }} is a marketo variable that needs to be included as final output.