Skip to content

rife.render.EncodeUrl

Erik C. Thauvin edited this page Mar 19, 2023 · 3 revisions

URL-encodes a template value.

Usage

<!--v render:rife.render.EncodeUrl:valueId/-->
{{v render:rife.render.EncodeUrl:valueId/}}

Syntax

Template

<a href="https://example.com/search?q={{v render:rife.render.EncodeUrl:query/}}"><!--v query/--></a>

Code

template.setValue("query", "books & movies");

Output

<a href="https://example.com/search?q=books%20%26%20movies">books &amp; movies</a>