Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-2167

HstLink.toUrlForm URLencodes the # character and request parameters

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.25.01-alpha
    • 2.25.05
    • None

    Description

      For example:

      String url = "/path/book#chapter1";
      HstLinkCreator linkCreator = request.getRequestContext().getHstLinkCreator();
      HstLink link = linkCreator.create(url, request.getRequestContext().getResolvedMount().getMount());
      if (link != null) {
      url = link.toUrlForm(request.getRequestContext(), false);
      }

      Now url will be "http://site.com/path/book%23chapter1" instead of "http://site.com/path/book#chapter1"

      See http://www.w3.org/TR/WD-html40-970708/htmlweb.html#h-4.1.1

      Apart from that request parameters are encoded as well, for example:

      http://www.site.com/path?hint=one&delay=two

      becomes

      http://www.site.com/path%3Fhint%3Done%26delay%3Dtwo

      Attachments

        Issue Links

          Activity

            People

              svoortman Simon Voortman (Inactive)
              abogaart Arthur Bogaart
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: