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
  • URL
  • Security

sanitize_url

Module

mod_base

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

Ensure that the input to this filter is HTML unescaped. As the filter is not unescaping any HTML entities.

Edit on GitHub

Related documentation

Models

m_access_url

Generate absolute resource page URLs signed with the current user's view permissions. Requires mod_access_url to be enabled. Opening the…

Modules

mod_access_url

Share protected pages, images and feeds using signed URLs with the signing user's view permissions. Recipients do not need to log in as…

Filters

get_admin_url

Return the absolute administration URL for a Zotonic site.

Filters

urlencode

Make a text safe for URLs.

Filters

parse_url

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

Filters

url_abs

Generates an absolute URL for the given dispatch information.

Filters

pickle

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

Filters

escape_check

Ensures thant an HTML escaped value is properly escaped.

Filters

is_site_url

Test if the given URL is a url for the current site.

GitHub © 2026 Zotonic