все
var textWithNBSpaceReplaced = originalText.replace(/ /g, ' ');
Ivan The Terrible
var textWithNBSpaceReplaced = originalText.replace(/ /g, ' ');