Uploaded image for project: 're-motion'
  1. RM-3687

Remotion.Web.Utilities.UrlUtility.FormatUrl(string format, params object[] args) does not url encode params args

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Normal
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 1.13.92
    • Components: Web
    • Labels:
      None

      Description

      current implementation:

      public static string FormatUrl (string format, params object[] args)
      {
        if (args == null)
          return format;
      
        string[] encodedArgs = new string[args.Length];
        Encoding encoding = GetResponseEncoding();
        for (int i = 0; i < args.Length; ++i)
          encodedArgs[i] = HttpUtility.UrlEncode (args.ToString(), encoding);
            
        return string.Format (format, encodedArgs);
      }
      

      expected:

      public static string FormatUrl (string format, params object[] args)
      {
        if (args == null)
          return format;
      
        string[] encodedArgs = new string[args.Length];
        Encoding encoding = GetResponseEncoding();
        for (int i = 0; i < args.Length; ++i)
          encodedArgs[i] = HttpUtility.UrlEncode (args[i].ToString(), encoding);
            
        return string.Format (format, encodedArgs);
      }
      

      fixed source code line:
      encodedArgs[i] = HttpUtility.UrlEncode (args[i].ToString(), encoding);

        Attachments

          Activity

            People

            • Assignee:
              Michael Ketting
              Reporter:
              Former user (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: