Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dynamic segments with URL-encoding #72

Closed
wants to merge 1 commit into from

Commits on Nov 26, 2015

  1. fix dynamic segments with URL-encoding

    ```js
    decodeURI('/foo%20bar') // '/foo bar'
    decodeURI('/foo%23bar') // '/foo%23bar'
    decodeURI('/foo%3fbar') // '/foo%3fbar'
    
    decodeURIComponent('/foo%20bar') // '/foo bar'
    decodeURIComponent('/foo%23bar') // '/foo#bar'
    decodeURIComponent('/foo%3fbar') // '/foo?bar'
    ```
    
    This fixes two separate, but related problems:
    
     1. `router.add([{ path: '/foo bar?baz', }])` did not previously
        match `/foo%20%3fbaz`
     2. `router.add([{ path: '/foo/:bar', ... }])`, when given
        `/foo/a%20b%23c%3fd`, would return params `{ bar: 'a b%23c%3fd' }`
    James A. Rosen committed Nov 26, 2015
    Configuration menu
    Copy the full SHA
    29eb1b2 View commit details
    Browse the repository at this point in the history