I need to disable phone number recognition in iPhone's Mail (or other application).
I tried without success the
<meta name="format-detection" content="telephone=no">
this only works in Safari.
I need to disable phone number recognition in iPhone's Mail (or other application).
I tried without success the
<meta name="format-detection" content="telephone=no">
this only works in Safari.
As mentiond here:
How do you disable phone number linking in iPhone Mail app?
You can add some invisible characters into the string to cheat the recognition.
I wrote a function in php for this inspired by Ookep's answer, tested and it works:
/**
* Confusing iPhone Mail or other mail client to not recognize numbers/string
* as phone numbers
*
* @access public
* @param $p_text - the sting/number to obfuscate
* @return the obfuscated string / false
*/
public static function obfuscate_number_recognition(string $p_text): ?string
{
// if text provided
if (strlen($p_text) > 0) {
// init vars
$obfuscated_text = '';
// looping through the string
for ($i = 0; $i < strlen($p_text); $i++) {
// building obfuscated text
// adding invisible space after every 3rd character
$obfuscated_text = ($i % 3 == 0)
? $obfuscated_text.$p_text[$i].'​'
: $obfuscated_text.$p_text[$i];
} // end for
return $obfuscated_text;
} // end if valid param
return false;
} // end func obfuscate text
As mentioned on another post, a simple answer is to put a zero-width joiner ‍
in the middle of the number. It worked for me.