*

7ala

  • ****
  • 144 posts
Arabic links problem
« on: July 10, 2021, 05:36:00 PM »
Arabic links problem
When sharing an item using this code
Sharing is done properly

<a  target="_blank" title="<?php echo osc_esc_html(__('Share this ad with your friends', 'eva')); ?>" href="https://api.whatsapp.com/send?text=<?php echo osc_item_url(); ?>" class="whatsapplink hideweb">
</a>

It Link like this

http://localhost/47/حلويات-sweet-soft

And when sharing the same code, but inside a script
The links appear like this

    $(function () {
        $('#support').floatingWhat({
            phone: '<?php echo $mobile; ?>',
            popupMessage: '<?php _e('Hello, how can we help you?', 'eva'); ?>',
            message: "<?php _e('Merhaba, with a number', 'eva'); ?>{<?php _e(' '); echo osc_item_id ();_e(' '); ?>}<?php echo osc_item_url(); ?>",
            showPopup: true,
            showOnIE: false,
            headerTitle: '<div style="font-size: 15px;padding: 19px 0px 0px 0px;"<i style="color: #bbbbbb;" class="fa fa-user-circle fa-3x" aria-hidden="true"></i>&nbsp;<?php echo osc_item_contact_name(); ?></div>'
        });
    })

It link like this

http://localhost/47/%d8%ad%d9%84%d9%88%d9%8a%d8%a7%d8%aa-sweet-soft



I don't know what's the problem
thank you

*

MB Themes

Re: Arabic links problem
« Reply #1 on: July 10, 2021, 06:09:22 PM »
It is encoded url, nothing more
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: Arabic links problem
« Reply #2 on: July 10, 2021, 06:20:15 PM »

*

MB Themes

Re: Arabic links problem
« Reply #3 on: July 11, 2021, 09:41:40 AM »
@7ala
Those are same links.

https://istizada.com/understanding-arabic-url-uri-structure-encoding-for-arabic-sites/

To illustrate further here is another example from an Arabic website about cosmetic surgery. The website contains a page about different types of plastic surgery procedures which has a URL that appears in your browser as follows:
https://site.com/عمليات-التجميل/

That said, when you copy the URL from your browser and paste it somewhere other than the browser bar you get the following string of characters.
https://site.com/%D8%B9%D9%85%D9%84%D9%8A%D8%A7%D8%AA-%D8%A7%D9%84%D8%AA%D8%AC%D9%85%D9%8A%D9%84/
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots