Hi everyone,
Over on our forum we have a issue where when a URL is oneboxed it changes the actual URL itself.
As a example:
This is a link to our website:
Offspring Probabilities:
1/16 Killer Clown,
3/16 Super Pastel 66% Het Clown,
1/8 Pastel Clown,
3/8 Pastel 66% Het Clown,
1/16 Clown,
3/16 66% Het Clown
But this is what shows when oneboxed:
With:
“%2C” being changed to “,”.
“+” Being changed to “%2B”
Which gives users the wrong results on our site.
Is there a way to stop this happening or a workaround?
Richie
(Richie Rich)
8 مارس 2021، 8:19م
2
Those links are both the same:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
Can you wrap/backtick them so we can see them as you intended?
إعجاب واحد (1)
Sorry, my bad
This is what it should look like:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel%2CHet+Clown&s2=Pastel%2CHet+Clown
This is what happens when oneboxed:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
If the url is functional in either case, why does it matter?
Because they lead to different results.
Here is what should be shown through the link:
Not this:
This makes a huge difference when trying to calculate genetics correctly.
إعجابَين (2)
david
(David Taylor)
24 يوليو 2023، 11:59ص
9
يبدو أن عناوين URL في المنشور الأصلي لم تعد قابلة للتحويل إلى معاينة (لا توجد علامات opengraph على الموقع). ولكن للتسجيل فقط، كان ينبغي حل هذه المشكلة بواسطة
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 إعجابات
david
(David Taylor)
تم إغلاقه في
23 أغسطس 2023، 12:00م
10
تم إغلاق هذا الموضوع تلقائيًا بعد 30 يومًا من آخر رد. لم تعد الردود الجديدة مسموح بها.