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

SimpleContentRewriter url-encodes query strings when rewriting urls

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.05.01, 2.05.03
    • 2.05.04, 2.20.02, 2.21.00
    • None
    • None

    Description

      When rewriting urls in the html content, the SimpleContentWriter also passes the query string (e.g. the part after a '?' in the path ) to the HstLink rewriting machinery, where the query string is url-encoded and thus not recognizable anymore as a query string.
      Usually paths in the html content pointing to other internal pages won't contain query strings, but in this particular (legacy) project the client uses request parameters to control the javascript on the target page.

      So paths like "/foo/bar?a=b" get rewritten as "/site/preview/foo/bar%3Fa%3Db"

      I've included a patch to the SimpleContentWriter class, which excludes the query string (if any) from the document path and appends it to the rewritten path after the translation.

      Attachments

        Issue Links

          Activity

            People

              wko Woonsan Ko (Inactive)
              pvanprooijen Pieter van Prooijen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: