public static string EscapeCharsForHttp(this string fileName)
{
fileName = fileName.Replace("%","%25");
// BL-117, PH: With the newer xulrunner, javascript code with parenthesis in the URL is not working correctly.
fileName = fileName.Replace("(", "%28").Replace(")", "%29");
return fileName.Replace(":", "%3A").Replace("#","%23").Replace("?","%3F");
}