Best viewed on desktop Mobile Friendly tutorial coming soon!

Unescaped Text

The previous lesson mentioned that ${...} escapes its value. See it in action on the right: the page interpolates a string containing HTML, and the preview shows the tags themselves as literal text — <em> and all. Escaping turns markup into harmless text.

Sometimes, though, you have markup that’s supposed to be markup — HTML you generated and sanitized yourself, like compiled markdown for a blog post. For that, Marko has the unescaped interpolation: add a !.

<article>
$!{articleHtml}
</article>

Change ${snippet} to $!{snippet} in the page. The <em> now renders as actual emphasis.

Powered by WebContainers Built with TutorialKit Built with ❤️ by defunkt-dev
Files
Preparing Environment
  • Installing dependencies
  • Starting dev server