Ciao a tutti,
Nel nostro forum c’è un problema: quando un URL viene “oneboxed”, viene modificato l’URL stesso.
Ad esempio:
Questo è un link al nostro sito web:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel%2CHet+Clown&s2=Pastel%2CHet+Clown
Ma questo è ciò che appare quando viene oneboxed:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
Con:
“%2C” trasformato in “,”.
“+” trasformato in “%2B”.
Ciò restituisce agli utenti risultati errati sul nostro sito.
Esiste un modo per evitare che ciò accada o una soluzione alternativa?
Richie
(Richie Rich)
8 Marzo 2021, 8:19pm
2
Quei link sono entrambi uguali:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
Puoi racchiuderli tra backtick così possiamo vederli come intendevi?
1 Mi Piace
Scusa, è stata una mia svista
Questo è come dovrebbe apparire:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel%2CHet+Clown&s2=Pastel%2CHet+Clown
Questo è ciò che succede quando viene messo in un solo riquadro:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
Se l’URL è funzionante in entrambi i casi, perché dovrebbe importare?
Tom_Eagle
(Tom Eagle)
9 Marzo 2021, 11:25am
5
Perché portano a risultati diversi.
Ecco cosa dovrebbe essere mostrato tramite il link:
Non questo:
Questo fa una grande differenza quando si cerca di calcolare correttamente la genetica.
2 Mi Piace
david
(David Taylor)
24 Luglio 2023, 11:59am
9
Sembra che gli URL nell’OP non siano più “oneboxable” (nessun tag opengraph sul sito). Ma solo per la cronaca, questo problema dovrebbe essere stato risolto da
committed 10:55AM - 09 Aug 22 UTC
normalized_encode in addressable has a number of issues, including https://githu… b.com/sporkmonger/addressable/issues/472
To temporaily work around those issues for the majority of cases, we try parsing with `::URI`. If that fails (e.g. due to non-ascii characters) then we will fall back to addressable.
Hopefully we can simplify this back to `Addressable::URI.normalized_encode` in the future.
This commit also adds support for unicode domain names and emoji domain names with escape_uri.
This removes an unneeded hack checking for pre-signed urls, which are now handled by the general case due to starting off valid and only being minimally normalized. Previous test case continues to pass.
UrlHelper.s3_presigned_url? which was somewhat wide was removed.
3 Mi Piace
david
(David Taylor)
Chiuso
23 Agosto 2023, 12:00pm
10
Questo argomento è stato chiuso automaticamente 30 giorni dopo l’ultima risposta. Non sono più consentite nuove risposte.