How to prevent auto links in Gmail!
We all know that when you compose an email in Gmail, any url that you copy-paste or type gets converted into a hyper-link.
Eg: Plain text - www.google.com - will become - www.google.com.
Have you wondered if we can prevent this from happening??
If you are thinking why would you ever need to prevent it, well let me tell you why I needed it.
Imagine you are building a website for your clients and there is a url from Google Alerts which the clients do not understand.
For example, try writing an email explaining how the following url is formed and what is important for the client:
http://www.example.com/url?rct=j&sa=t&url=https://www.client-website.com/articles/some-article/&ct=ga&cd=XYZ&usg=ABC
###Here is what I wanted to do in the email:
- Write the URL as:
http://www.example.com/url?rct=j&sa=t&url=https://www.client-website.com/articles/some-article/&ct=ga&cd=XYZ&usg=ABC - And explain what's the significance of the url part in grey and what's the significance of that in green.
- I did that using the `Formatting options` while composing the email.
But when I hit Send...
###This is what google email parser did:
- It recognized that i’m trying to put a url in the email. So it changed the url to look like any other link:
http://www.example.com/url?rct=j&sa=t&url=https://www.client-website.com/articles/some-article/&ct=ga&cd=XYZ&usg=ABC - All that I had explained using color coding was useless.
- Even though I knew about the auto link detection by google, it did not strike my mind while writing the email.
####I looked at all the settings in Gmail to see if we can turn off auto link. I found a setting to enable Undo send
for 30 seconds (Useful for next time), but nothing related to auto links!!.
####Now I had to figure out a Hack to do this ! Which I did ! Here is how I did it …
-
Write the url and use Formatting options to make it look the way you want.
-
Open Chrome developer tools OR Firebug for Firefox users (IE Users - Download better browser!). Inspect the colorful/formatted url in the email.
-
In the Chrome dev tools, make the following modifications by using Edit as html option.
- Enclose
http://
into a span tag.Like this<span>http://</span>
Before
After - Similarly, Enclose
www.
into a span tag. Like this<span>www.</span>
- Enclose
You are good to hit Send Send...
And here is my inbox with the colorful/formatted URL as I wanted:
##Thank you.. Happy Hacking …