How to disable auto phone number linking in Safari browser?

Dung Do Tien Aug 09 2022 68

Hello guys, 

I have a web page that helps display detailed order information of a customer,  It showed well on almost major browsers but on the iPhone Safari browser it auto makes a phone number as a hyperlink, and when clicked I can call with that number. 

I don't know why because I didn't make the link for that phone number, here is my HTML code demo:

 <p>Customer name is Jack Boy</p>
<p>Customer Address is 123 Bostom</p>
<p>Your order number is 9876543210</p>
<p>Total price is 90,000$</p>

And here is the result

How to disable auto phone number linking in Safari browser?

I have researched on the internet and tried to add the meta tag below:

  <meta name="format-detection" content="telephone=no" />

But it still didn't work for me.

Please help me if you know of any other solution.

Have 2 answer(s) found.
  • R

    Radu Bagrii Aug 09 2022

    I really got the same issue and tried many ways but it didn't work for me. And here is a manual solution you can try:

    Add more &zwj; before your phone number. For example: 

    Replace:

     <p>Your order number is 9876543210</p>

    To

     <p>Your order number is &zwj;9876543210</p>

    It really worked for me. I hope this answer will useful for you.

  • A

    Amirhossein Janmohammadi Aug 16 2022

    I really fixed this bug on my project. I solved by this way:

    Step 1: Create CSS to help disable hyperlinks

     .autolink-safari a{
        pointer-events: none !important;
        text-decoration:none !important; 
        color:inherit !important;
    }

    Step 2: Add CSS from step 1 to the phone tag parrent

     <p class="autolink-safari">Your order number is 9876543210</p>

    Hope this will useful for you

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close