iOS Safari: ARQL truncates canonicalWebPageURL when it contains encoded query parameters
- Dominant language
- TypeScript
- Stars
- 8.2k
- Forks
- 947
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When passing `canonicalWebPageURL` to ARQL as part of the USDZ file path, if the `canonicalWebPageURL` contains multiple query parameters as part of the URL, even when URI encoded, ARQL will truncate the shared URL down to just the first parameter, when clicking on the Share button from within the ARQL session.
For example, when giving a USDZ a path of:
`https://example.com/example.usdz#canonicalWebPageURL=https%3A%2F%2Fexample.com%2F%3Ffoo%3D111%26bar%3D222`
The shared URL will get truncated down to:
`https://example.com/?foo=111`
Rather than:
`https://example.com/?foo=111&bar=222`
This makes it not possible to specify a `canonicalWebPageURL` containing multiple query string parameters.
This _does_ work in iOS Chrome and `canonicalWebPageURL` can contain multiple encoded query parameters. So it appears to be an issue somewhere with Safari hand off to QuickLook, rather than QuickLook itself?
#### Live Demo
- Visit: https://usdz-params.glitch.me/
- Scroll to "6. Complex Share URL".
- Tap the image to launch ARQL.
- Model opens in ARQL.
- Tap the Share button.
- Copy the shared URL.
- Observe the shared URL is truncated. It should be https://example.com/?foo=111&bar=222&spam=333&eggs=444 but is only copied as https://example.com/?foo=111
Issue reported here:
https://bugs.webkit.org/show_bug.cgi?id=248219
### Version
- model-viewer: any
### Browser Affected
- [ ] Chrome, version: xx.x.xxxx.xx
- [ ] Edge
- [ ] Firefox
- [ ] IE
- [x] Safari
### OS
- [ ] Android
- [x] iOS, v16 and v17
- [ ] Linux
- [ ] MacOS
- [ ] Windows
### AR
- [ ] WebXR
- [ ] SceneViewer
- [x] QuickLook
Contributor guide
Assessment
This issue has not been assessed yet.