c.urlEncode (text : string, [encoding : string]) : string

The method urlEncode encodes the given string for use as a parameter value in a query string. If no encoding is specified, the system resorts to the configured encoding of the onion Renderengine.

<xsl:variable name="query" select="'getit dienstleistung'" />
<a href="{c.urlEncode($query, 'ISO-8859-1')}&meta="> Suche nach dem Begriff "getit" </a>
Structure of an external URL with parameter transfer

In this example it is ensured that the transferred parameter value of the variable “query” is coded in a URL-compliant manner.