Home Forums General Issues Unwanted &nbsp in text field – how to get rid of?


Unwanted &nbsp in text field – how to get rid of?

  • This may or may not be an ACF issue, but I have a normal ACF text field, and for some reason it’s inserting a   between the last and second to last word. This is causing issues in that the last 2 words are then not breaking onto a new line and spilling out of the surrounding div.

    I have tried deleting the text and writing it out manually just to rule out any copy/paste issues and still getting the same.

    I’m tearing my hair out over this issue, any advice would be welcome!

  • ACF will not add this character to the text.

    However, if you hold the shift key when you are typing the space this will insert a   into the text editor. Is it possible that this is happening?

    If this is not the case then there would have to be some filter on your site that is doing this on an ACF hook like acf/save_post or acf/update_field or even acf/format_value. Have you looked in the DB to see if the character is in the saved content of the field?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.