Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_base
  • Reference
  • Frontend developer
  • Template filter
  • Serialize
  • URL

urlencode

Module

mod_base

Make a text safe for URLs.

Translates all url unsafe characters in the value to their percent encoding.

For example:

{{ value|urlencode }}

When value is “msg=Hello&World” then the output is “msg%3DHello%26World”.

Edit on GitHub

Related documentation

Filters

url_abs

Generates an absolute URL for the given dispatch information.

Filters

url

Generates the relative URL for the given dispatch information.

Filters

get_admin_url

Return the absolute administration URL for a Zotonic site.

Filters

sanitize_url

Sanitize an URL. Removes URLs that might be dangerous, like javascript: URLs.

Filters

parse_url

Parses an URL (URI) using uri_string:parse/1 .

Filters

to_json

Display any value as in JSON (JavaScript Object Notation).

Filters

escapejson

Escapes the value for safe insertion into JSON strings.

Filters

pickle

Pickle an Erlang value so that it can be safely submitted with a form.

Filters

escapexml

Escape the value for insertion in xml output.

GitHub © 2026 Zotonic