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
  • Render
  • Text
  • HTML

linebreaksbr

Module

mod_base

Translate ASCII newlines (\n) into HTML <br /> elements.

The following string:

{{ "foo\nbar"|linebreaksbr }}

will evaluate to foo<br />bar.

Edit on GitHub

Related documentation

Filters

render

Render a template.

Filters

merge_tags

A mail-merge like filter where tag-expressions in a text are replaced with the value of their evaluation.

Filters

truncate_html

Truncate a HTML text to a maximum length.

Filters

toc

Filter to derive a Table Of Contents from a HTML body.

Filters

show_media

Convert the image markers in HTML from the Rich Text editor into image tags.

Filters

urlize

Find urls in the given input and make them clickable.

Filters

brlinebreaks

Translate HTML <br/> elements into ASCII newlines ( \n ).

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