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

striptags

Module

mod_base

Removes all HTML tags from the value.

Useful as part of filtering input from external sources.

For example:

{{ value|striptags }}

When value is <b>Hello</b>world then the output will be Helloworld.

Striptags optionally allows a maximum length of characters to be returned:

{{ value|striptags:80 }}

This returns a string truncated to max 80 characters, including whitespaces etc.

Edit on GitHub

Related documentation

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

sanitize_html

Sanitize a HTML code. Removes elements and attributes that might be dangerous, like <script> elements.

Filters

escape_link

Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute, and replaces all newlines with <br> tags.

Filters

force_escape

HTML escapes a text.

Filters

unescape

Removes HTML escaping from a text.

Filters

render

Render a template.

Filters

format_dispatch_path_element

Format dispatch path element so variables will be more visible.

Filters

format_dispatch_controller_option

Format dispatch controller options.

GitHub © 2026 Zotonic