Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4141

Desktop.setBookmark escapes slash symbols wrongly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.4, 8.6.0
    • Fix Version/s: 8.6.1
    • Component/s: General
    • Labels:
      None

      Description

      Steps to Reproduce

      <zk>
          <button onClick='desktop.setBookmark("/error/404")' label="test"/>
      </zk>
      

      Click the button and see the URL.

      Current Result

      The bookmark is %2Ferror%2F404

      Expected Result

      The bookmark is /error/404

      Debug Information

      According to https://tools.ietf.org/html/rfc3986#section-3.5

      fragment = *( pchar / "/" / "?" )

      https://github.com/zkoss/zk/blob/v8.6.0/zk/src/archive/web/js/zk/bookmark.js#L43
      The encodeURIComponent method was used.

      Workaround

        Activity

        Hide
        Anonymous added a comment -

        Fixed since 2018/12/27

        Show
        Anonymous added a comment - Fixed since 2018/12/27

          People

          • Assignee:
            Leon03 Leon03
            Reporter:
            rudyhuang rudyhuang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Time Spent - 2 hours Remaining Estimate - 2 hours
              2h
              Logged:
              Time Spent - 2 hours Remaining Estimate - 2 hours
              2h