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

Desktop.setBookmark escapes slash symbols wrongly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.1
    • 5.0.4, 8.6.0
    • General
    • None

      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

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

              Created:
              Updated:
              Resolved:

                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