replace multiple spaces, html char codes are invalid