-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
ufo 1.6.1
Reproduction
import { withQuery } from 'ufo'
const actual = withQuery('/', { url: 'https://google.com?query=123' })
const expected = `/?url=${encodeURIComponent('https://google.com?query=123')}`
Describe the bug
The withQuery
utility does not encode the "?" character that results in incorrect encoding in some cases. For example
Actual: /?url=https:%2F%2Fgoogle.com?query=123
Expected: /?url=https%3A%2F%2Fgoogle.com%3Fquery%3D123
Additional context
No response
Logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working