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 pages

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

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

escape_ical_text

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

Filters

humanize_identifier

Convert an underscore-separated identifier to a readable label.

GitHub © 2026 Zotonic