все

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