No Non-breaking Space Filter is a simple filter module that filters out all non-breaking spaces ( ). Like all filter modules, the No Non-breaking Space Filter does not change the text stored in the database. The filter goes into action only after the text is loaded from the database and the text has to be displayed on the website.
All non-breaking space HTML entities are replaced by blank space characters. Multiple contiguous space characters are replaced by a single blank space character.
Of course, the non-breaking space HTML entity has its right to exist. But multiple consecutive non-breaking space entities in a contiguous text break all typographical rules. When texts are copied from text processors like Microsoft Office Word or Libreoffice Writer into the Drupal WYSIWIG editors, then what should never have happened can happen. ...
Configuration
Text format filter
Go to Administration » Configuration » Content authoring » Text formats (admin/config/content/formats) to enable this filter on your existing text formats or create a new text format ...
... and finally get rid of formated texts like this example.
There is only one additional setting: Preserve placeholders (by default not enabled). A placeholder non-breaking space is surrounded by a HTML tag, for example <p> </p>.
Field formatter
Got to Administration » Structure » Content types » Your content type » Manage display (admin/structure/types/manage/<content-type>/display) and select the field formatter.
Similar / related modules
- Module nbsp_filter: Its main purpose is to avoid punctuation marks to break alone on a newline for languages where it has to have a space before or after.
- Module nbsp: Does the opposite. It is a CKEditor plugin to insert nbsp’s.
Project information
- Project categories: Content editing experience
1,568 sites report using this module
- Created by joseffriedrich on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Add Drupal 11 compatibility.
Development version: 8.x-1.x-dev updated 9 Aug 2024 at 10:01 UTC


