Go: Prevent safari in iOS devices from identifying numbers as phone numbers
The test found that safari on the ipad always identifies long strings of numbers as phone numbers, text turns blue, and pop-up menus are added to contacts.
Other places, if there is a number in the user name (mobile phone registration Sina Weibo user name is "mobile phone user xxxxxxxx"), the layout will be very disgusting.
The long string of numbers tested in a tag is not recognized as a phone, so nesting a non-action a tag in place of a user name but not a link temporarily solves the problem.
But this adds extra tags, the semantics of the code becomes poor, and the method cannot be used for large pieces of text.
Accidentally crashed into Safari's official website today and found out that Safari has a private meta attribute to solve this problem:
<meta name= "format-detection" content= "Telephone=no"/>
The
Official website is described below: How does I disable automatic detection of phone numbers in webpages? In Safari on IPhone, phone numbers is automatically detected and transformed into links this dial the phone number when t apped. If you have strings of numbers in your webpage that should is automatically detected as phone numbers, you can choose To disable this feature on the entire page is adding the META tag shown in Listing.