SharePoint 2013 Content Editor – zero width space characters

Sometimes, the content editor web part of SharePoint 2013 adds unwanted characters to the text within it. You check once, twice, remove any unnecessary line breaks, spaces etc., but after saving or in the HTML source of the page you find these weird characters: ​ – the zero width spaces (& #8203;)

They can mess up your CSS layout, and frankly, I have not found a solution to force SharePoint not to insert them.

One possible workaround would be to remove them with a library like jQuery, e.g.


$(‚.ms-rtestate-field’).each(function(index,element)  {
var theeditor = $(element);

The selector applies to the content editor webpart of SP2013.

Hope this helps.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *