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

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

escape

HTML escape a text. Escapes all reserved HTML characters in the value. Escaped strings are safe to be displayed in a HTML page. When you…

Filters

is_site_url

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

Filters

striptags

Removes all HTML tags from the value.

GitHub © 2026 Zotonic