Home » Php » php – Is it possible to disable the iPhone's automatic hyperlinks?

php – Is it possible to disable the iPhone's automatic hyperlinks?

Posted by: admin July 12, 2020 Leave a comment


We send out a notification email whenever we have “phishing” emails reported to us. In these emails, we include a copy-paste of the text inside the original phishing email as a sample of what is reported to us. Our code strips all hyperlinks out of the email via PHP, but still includes (in plain text) the link. When users receive this email in their client (Thunderbird, Outlook, Horde/IMP, etc), the hyperlink is removed.

However, the iPhone likes to take web addresses in plain text and automatically turn them into hyperlinks. Is there any possible way to stop this action from happening via a HTML tag or by using PHP to replace certain parts of the hyperlink?

How to&Answers:

There doesn’t seem to be a way to suppress this behaviour so how about turning them back into links but with no href?

http://example.com -> <a href="">http://example.com</a>


You could try inserting zero-width unicode whitespace at some part of the url.

u'http://www.\u2060example.com' (in python –[sorry])

U+2060 is called ‘Word Joiner’. It’s a zero width, non-breaking white space character.

This shouldn’t be a valid url, so hopefully the iPhone won’t turn it into a link.



I had to put my email address that contains an underscore in quotations to stop it from
being turned into a hyperlink which hides the underscore from view.
Example 1: “[email protected]