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 pages

  • sanitize_url Sanitize an URL. Removes URLs that might be dangerous, like javascript: URLs. →
  • is_site_url Test if the given URL is a url for the current site. →
  • url_abs Generates an absolute URL for the given dispatch information. →
  • url Generates the relative URL for the given dispatch information. →
  • urldecode Decode a text where characters are encoded as URL-safe characters. →

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

escape_ical_text

Escape a value for an iCalendar TEXT property, such as SUMMARY, DESCRIPTION or LOCATION. Backslashes, commas and semicolons are escaped…

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.

GitHub © 2026 Zotonic