Bloom.Publish.PublishModel.SanitizeFileName C# (CSharp) Method

SanitizeFileName() private static method

Ampersand in book title was causing Publish problems
private static SanitizeFileName ( string fileName ) : string
fileName string
return string
        private static string SanitizeFileName(string fileName)
        {
            fileName = Path.GetInvalidFileNameChars().Aggregate(
                fileName, (current, character) => current.Replace(character, ' '));
            // I (GJM) set this up to keep ampersand out of the book title,
            // but discovered that ampersand isn't one of the characters that GetInvalidFileNameChars returns!
            fileName = fileName.Replace('&', ' ');
            return fileName;
        }