Cannot Get Query When URL contains space %20

Hi,

I encounter a weird behavior where I not able to get the query for url that contains the encoded space %20.

For example
case 1: https://example.com/HelloWord?id=12345
case 2: https://example.com/Hello%20Word?id=12345

I able to get the query param via $f7route.query.id for case 1 but for case 2 it’s undefined

I am not sure such URLs are supported, it is better to pass such data in query rather than route params. But you can try :

$f7.utils.parseUrlQuery($f7route.url).id
1 Like

Thank you. My bad I assumed the router by default will encode the URL so it’s fixed by encoding the route params.