Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-73

Added $esc.http(string) to allow the encoding of http parameter values

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: GenericTools
    • Labels:
      None
    • Environment:
      all

      Description

      Delegates encoding to java.net.URLEncoder(String,"UTF-8").

      $http("Hello here & there") produces "Hello+here+%26+there"

      1. escape-http.patch
        4 kB
        Claude Brisson

        Activity

        Hide
        nbubna Nathan Bubna added a comment -

        Good point. It should probably be $esc.url(String). since escape is roughly a synonym of encode, $esc.urlEncode(String) is a little redundant.

        Show
        nbubna Nathan Bubna added a comment - Good point. It should probably be $esc.url(String). since escape is roughly a synonym of encode, $esc.urlEncode(String) is a little redundant.
        Hide
        marcn Marc Novakowski added a comment -

        Just a quick comment about the method name - "$esc.http(string)" seems overly generic to me and potentially ambiguous, since the HTTP protocol uses many types of encodings (URL encoding for the URL, HTML encoding for HTML content, etc. etc.)

        Perhaps a more accurate name for this method could be $esc.url(string) instead? Or $esc.urlEncode(string)?

        Show
        marcn Marc Novakowski added a comment - Just a quick comment about the method name - "$esc.http(string)" seems overly generic to me and potentially ambiguous, since the HTTP protocol uses many types of encodings (URL encoding for the URL, HTML encoding for HTML content, etc. etc.) Perhaps a more accurate name for this method could be $esc.url(string) instead? Or $esc.urlEncode(string)?
        Hide
        claude Claude Brisson added a comment -

        commited

        Show
        claude Claude Brisson added a comment - commited

          People

          • Assignee:
            claude Claude Brisson
            Reporter:
            claude Claude Brisson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development