src/BloomExe/Extensions.cs
/// <summary>
/// Escapes a number of characters that need it for our url/http processing.
/// </summary>
/// <remarks>
/// Note that calls to EscapeFileNameForHttp() must be matched by an equal number of
/// subsequent calls to UnescapeFileNameForHttp().  (Normally each is called once.)
/// </remarks>
Escapes a number of characters that need it for our url/http processing.
Escapes a number of characters that need it for our url / http processing .
public static string EscapeFileNameForHttp(this string fileName)
		{
			var escapedPathComponents = fileName.Split(kDirectorySeparators).Select(Uri.EscapeDataString);
			string escapedFileName = String.Join("/", escapedPathComponents);
			return escapedFileName;
		}
public static string EscapeFileNameForHttp ( this string fileName ) { var escapedPathComponents = fileName . Split ( kDirectorySeparators ) . Select ( Uri . EscapeDataString ) ; string escapedFileName = String . Join ( " " , escapedPathComponents ) ; return escapedFileName ; }
Escapes a number of characters that need it for our url/http processing.
Escapes a number of characters that need it for our url / http processing .
// Our original implementation manually escaped the following characters: '%', ':', '#', '?', and '(', ')' (In BL-117, parenthesis in the URL was not working correctly) // Now we rely on a System.Uri function, which is more thorough about escaping characters.
string
this
remarks
Note that calls to EscapeFileNameForHttp() must be matched by an equal number of
subsequent calls to UnescapeFileNameForHttp().  (Normally each is called once.)
Note that calls to EscapeFileNameForHttp () must be matched by an equal number of subsequent calls to UnescapeFileNameForHttp () . ( Normally each is called once . )