Problem/Motivation

Add a magic "filter" section variable that allows the following filtering:

* {{#filter.trim}} My whitespace will be trimmed. {{/filter.trim}}
* {{#filter.striptags}}

My HTML tags will be removed.

{{/filter.striptags}}
* {{#filter.nl2br}}The new line \n will be converted to a break tag.{{/filter.nl2br}}
* {{#filter.spaceless}}Removes whitespace between HTML tags.{{/filter.spaceless}}
* {{#filter.upper}}Makes the whole text uppercase.{{/filter.upper}}
* {{#filter.lower}}Makes the whole text lowercase.{{/filter.lower}}
* {{#filter.capitalize}}The first letter of the text will be uppercase.{{/filter.capitalize}}
* {{#filter.truncate.100}}This text will be truncated when it exceeds 100 characters, and appended with a ... if it was truncated.{{/filter.truncate.100}}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mxh created an issue. See original summary.

  • mxh committed 405d6da on 2.0.x
    Issue #3276919 by mxh: Add a magic "filter" section variable
    
mxh’s picture

Assigned: mxh » Unassigned
Status: Active » Fixed

  • mxh committed b5d92a6 on 2.0.x
    Issue #3276919 by mxh: Add a magic "filter" section variable
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.