Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81316

moodle_url does not produce RFC 3986 compliant URL fragments (anchors)

XMLWordPrintable

      This is a followup to MDL-80338, and 81313.

      All anchors/fragments should be RFC3986 compliant. They are not.

      RFC 3986 allows the following characters in a fragment without them being encoded:

      pct-encoded: "%" HEXDIG HEXDIG
      unreserved:  ALPHA / DIGIT / "-" / "." / "_" / "~" /
      sub-delims:  "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" / ":" / "@"
      fragment:    "/" / "?"
      

      It's worth noting that items in the sub-delims, and fragments, sections may be encoded as they come under the pct-encoded banner when encoded but they do not have to be encoded.
      It's also worth noting that in the cases I've tried (browser jumping to anchor) a browser will treat both the encoded and unencoded values identically for these types.

      I feel that we need to:

      1. create a new method to get the encoded value and use it during output
      2. update the comparison method to standardise the fragments before comparison

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Paul Holden Paul Holden
            Safat Shahin Safat Shahin
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 11 minutes
                4h 11m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.