I had the exact same problem - UPCs in emailed receipts would be auto-detected as phone #s and make the emails look bad not to mention confusing with all the links. I discovered a trick that worked for me: I wrote a function that would take string data and embed zero-width non-join character (‌
) every 3rd character (I picked 3 randomly, you could probably do fewer inserts and still disrupt but I haven't tested). My c# function looks like:
private string iPhoneDisruptAutoLinks(string val)
{
StringBuilder newVal = new StringBuilder();
int count = 0;
foreach (char c in val.ToCharArray())
{
count++;
if (count == 3)
{
count = 0;
newVal.AppendFormat("‌{0}", c);
}
else
{
newVal.Append(c);
}
}
return newVal.ToString();
}
So a UPC of 1234567890 would be rendered as:
123‌456‌789‌0
My tests on iPhone 4/4S worked great. I have not tested iPhone 3 or iPads.
This method also appears to disrupt the iPhone 4/4S address detection (which was another annoyance for us).
Hope this helps.