Is there any rhyme or reason to the adding of non-breaking spaces or traditional space? It seems to appear at random throughout the content in my rich text fields.

  • Yep I'd like to know as well how to prevent Redactor adding those pesky   all over the place. Seems the problem is worse with redactor 2. Dec 15 '15 at 13:49

I've found that this happens when you end a line or string with a space and put nothing after it.

"Text "
becomes "Text "

If you then copy "Text " and paste it repeatedly you'd end up with "Text Text Text Text Text Text "

Same for a lone space on a line.

" "
becomes ";nbsp"


This is a bug in Redactor. There has been an ongoing bug report about it here. But I found that if you use Firefox it doesn't add the non-breaking spaces when editing.

onebrightlight (on Slack) suggested a temporary fix to replace them with spaces in your template code:

{{ entry.fieldname | replace({' ' : ''})|raw }}

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .