مرحبًا بالجميع،
في منتدانا، توجد مشكلة حيث يتم تغيير الرابط الفعلي عند عرضه كروابط مباشرة (oneboxed).
على سبيل المثال:
هذا رابط لموقعنا:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel%2CHet+Clown&s2=Pastel%2CHet+Clown
أما هذا ما يظهر عند عرضه كروابط مباشرة:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
حيث:
تم تغيير “%2C” إلى “,”.
تم تغيير “+” إلى “%2B”.
وهو ما يؤدي إلى ظهور نتائج خاطئة للمستخدمين على موقعنا.
هل توجد طريقة لمنع حدوث ذلك أو بديل عملي؟
Richie
(Richie Rich)
8 مارس 2021، 8:19م
2
هذه الروابط متطابقة:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
هل يمكنك وضعها بين علامتي تنصيص عكسية (backticks) حتى نتمكن من رؤيتها كما تقصد؟
عذراً، خطأ مني
هذا ما يجب أن يبدو عليه الشكل:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel%2CHet+Clown&s2=Pastel%2CHet+Clown
وهذا ما يحدث عند وضعه في مربع واحد:
https://www.morphmarket.com/c/reptiles/pythons/ball-pythons/genetic-calculator/?s1=Pastel,Het%2BClown&s2=Pastel,Het%2BClown
إذا كان عنوان URL يعمل في كلتا الحالتين، فلماذا يهم؟
لأنها تؤدي إلى نتائج مختلفة.
إليك ما يجب أن يظهر عبر الرابط:
وليس هذا:
هذا يُحدث فرقًا كبيرًا عند محاولة حساب الوراثة بشكل صحيح.
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.