Unwanted nbsp's instead of space characters in Rich Text editor

1,280 views
Skip to first unread message

Goran

unread,
Nov 16, 2016, 5:22:35 PM11/16/16
to Hippo Community

Hi all,


I'm experiencing the following within the cms (10.2.2).

It seems browsers are adding unwanted nbsp's instead of spaces in the Rich Text Editor for every even sequential space added to the text, like this following example.


The  quick brown    fox jumps over the lazy dog

So when the first normal space is removed it won't modify the following nbsp into a space, thus preventing normal flow of text. 

Does anyone have an idea to prevent this from happening?


Krgds, 

Goran


Mathijs den Burger

unread,
Nov 18, 2016, 3:59:09 AM11/18/16
to hippo-c...@googlegroups.com
Hi Goran,

Converting a double space into space +   seems to be caused by your browser. Which browser are you using?

This makes sense since browsers will render several consecutive spaces as a single space, unless the extra spaces are encoded as  . So if you type two spaces in an HTML field the encoding ensures that they will also be rendered as two spaces.

Very old CKEditor thread about it: http://ckeditor.com/comment/33942#comment-45910

I would not apply the suggestion in the StackOverflow thread to set the config option 'basicEntities' to 'false', as that will also prevent escaping of many other characters and may result in invalid HTML.

hope this helps,
Mathijs


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Goran Visser

unread,
Nov 18, 2016, 4:50:45 AM11/18/16
to hippo-c...@googlegroups.com
Hi Mathijs,

Thanks for taking the time answering my question. Most current browsers seem to have this 'feature' which probably works out fine most of the time, unless you remove the leading space then you're left with only a nbsp, which then causes the (in this case) unwanted outcome of the entity's original use, keeping 2 words together on one line. I think for now the only way to handle this is to know about it and then work around it. I'll try to query for the existing ones, removing them manually. I agree on not setting basicEntities to false, preventing you to from actually using the nbsp when you do want it. I thought maybe doing some replacing on save would help, but that would probably have more unwanted side-effects as well.

Krgds, 
Goran


You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/fOCBIEQzwTc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-community+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages