SharePoint 2013 ​ zero width spacing characters.

Hi,

Just want to let you know that to clean SharePoint html from the Rich Text Editor that has all annoying &#8203 characters, it is better to use this lovely script.

Using standard jquery such as:
jQuery('#s4-bodyContainer').html(jQuery('#s4-bodyContainer').html().replace(/\u200B/g,''));

can lead to unintended behaviour in certain scenarios, especially when some of the content is generated asynchronously as that script will replace the html before it's generated. This happened to me when I used the Search Result Webpart.

HTH,
Andreas

Comments

Popular posts from this blog

SharePoint 2013 anonymous access add attachments to list item

Sitecore custom publish agent from specific node and at a specific time

CRM Plugin - Parent and Child Pipeline