google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.71k stars 800 forks source link

iOS Safari: ARQL truncates canonicalWebPageURL when it contains encoded query parameters #4570

Open milesgreen opened 7 months ago

milesgreen commented 7 months ago

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

Issue reported here: https://bugs.webkit.org/show_bug.cgi?id=248219

Version

Browser Affected

OS

AR

elalish commented 7 months ago

Thanks for filing the Webkit bug!

milesgreen commented 2 months ago

@AdaRoseCannon - one more iOS ARQL issue...


Issue also reported on WebKit Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=248219

Reported via Feedback Assistant (FB13779483)


canonicalWebPageURL share links with multiple query parameters get truncated when shared.

Fails in iOS Safari. Works in iOS Chrome.

Repro:

https://arquicklook-usdz-params.glitch.me/share.html?foo=1111&bar=2222&spam=3333&eggs=4444

But is only shared as:

https://arquicklook-usdz-params.glitch.me/share.html?foo=1111

milesgreen commented 3 weeks ago

@AdaRoseCannon - this one is still an issue with iOS 18.0 beta. canonicalWebPageURL gets truncated when multiple query params are present.