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

Desktop.setBookmark escapes slash symbols wrongly

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 5.0.4, 8.6.0
    • Fix Version/s: None
    • 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

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated: