madebykind/craft.windontextension

Provides a `widont` filter in your Craft CMS templates

1.0.1 2015-06-02 11:25 UTC

This package is auto-updated.

Last update: 2024-05-15 07:32:22 UTC


README

Provides a widont filter in your Craft templates.

Installation

Drop the windontextension directory into craft/plugins, and install from the CP.

Usage

{{ entry.title | widont | raw }}

Caveat developer

Craft runs Twig with autoescape on, so as the widont filter replaces the last not trailing space in the filtered string with an HTML entity for a non-breaking space, so you will probably then want to pass its output to the raw filter.

This is a bad idea for untrusted input.