Download the PHP package belniakmedia/craft-allow-nbsp-twig-filter without Composer
On this page you can find all versions of the php package belniakmedia/craft-allow-nbsp-twig-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download belniakmedia/craft-allow-nbsp-twig-filter
More information about belniakmedia/craft-allow-nbsp-twig-filter
Files in belniakmedia/craft-allow-nbsp-twig-filter
Package craft-allow-nbsp-twig-filter
Short Description Unescape escaped nbsp entities via twig filter.
License MIT
Informations about the package craft-allow-nbsp-twig-filter
Allow NBSP Twig Filter plugin for Craft CMS 4.x
This twig filter, when applied to an escaped twig string will un-escape the & entity that the & in " " was converted to by the initial escaping process. This allows content editors to insert their own non-breaking space into fields to prevent text widows on rendered pages.
Requirements
This plugin requires Craft CMS 4.0.0 or later. (See tag 1.0.0 for Caft CMS 3.x)
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require belniakmedia/craft-allow-nbsp-twig-filter
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Allow Twig Filter.
Allow Twig Filter Overview
We wanted a quick and easy way for our content editors to be able to insert entities manually without having them be escaped by the standard twig escape policy. This allows the standard escaping to happen and just unescapes   back to
Using Allow Twig Filter
Craft Template Example:
{{ entry.description | allowNbsp }}
Brought to you by Belniak Media, Inc.