Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

How to pass '+' in query? #618

Closed
thgh opened this issue Mar 27, 2019 · 0 comments · Fixed by #623
Closed

How to pass '+' in query? #618

thgh opened this issue Mar 27, 2019 · 0 comments · Fixed by #623

Comments

@thgh
Copy link
Contributor

thgh commented Mar 27, 2019

I'm trying to pass a phone number, it's getting rendered correctly server-side, but not client-side.
Cause:

value = (value || '').replace(/\+/g, ' ');

Repro: https://github.com/thgh/sapper-template/tree/repro-618

  1. Go to /?phone=+1234
    Expected: $page.query.phone === '+1234'
    Actual: $page.query.phone === ' 1234'
  2. Go to /?phone=%2B1234
    Expected: $page.query.phone === '+1234'
    Actual: $page.query.phone === ' 1234'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant