Why is a number in my link text appearing as *************** (stars)? - hyperlink

I have posted this as, although I worked out the answer, I could not find anything about it in a Google/stackoverflow search. I hope it might help someone in the future.
My C# MVC app generates a link and emails it to the user. In the email the html is simply a link tag with the url used as the href and the link text.
In the email in Outlook the link displays as below:
http://mydomain.com/Foo/Bar?id=6***************
When you hover over the link it shows as
http://mydomain.com/Foo/Bar?id=6523054102058710
The numbers should always show, otherwise the user may be suspicious.

It turns out that the number I was generating was 16 digits, inadvertently the same as a credit/debit card number. This meant that some email clients were hiding the number to protect privacy.
To solve the problem I simply changed the number of digits.

Related

How do you add linked text to a description in Asana?

There is a similar question here but the person answering said it is not possible. I have to believe he did not understand the question...
So I apologize for asking again... I can paste an entire url into a description field in asana and it will render as a link. But I can't figure out how to shorten it to something like short text or [short text](myurl)
Unfortunately, he's right: we don't let there be different text for the link than the text in the url, so it's not possible to have a link to short text, only things like http://myurl.com. This is somewhat mitigated by the fact that we'll truncate the url when displaying in an Asana text box (it will run on for some characters, then terminate with "..."), so extremely long urls shouldn't cause too many text layout issues. This is enforced at render time, so there's not a way to do this with the API either.
There are a number of reasons for this - security, as he mentioned, is one; more clarity is better here. We've got some customers that don't want to enable, for instance, <a href="http://hijacker.com/pwned">example.com<\a> links that their non-technical users might encounter without thinking about it - basically, they don't want the same level of paranoia in Asana as is required to be a responsible email user, so we went WYSIWYG here.
I'd be interested, however, if you could come up with a compelling use case for why this is necessary. We're always up for getting feedback!

Using Gmail message source, generate direct link

So using the gmail message source is it possible to generate, a link to the message/thread in GMail's own interface?
on http://productforums.google.com/forum/#!topic/gmail/goChl1gG0NQ they use the following
https://mail.google.com/mail/#all/<HexEncodeMessageID>
Is this related to the Message=ID header found in the mail's source?
Message-ID: <SomeID#SomeID.mail>
The discussion Find Gmail url-IDs via IMAP seems to only give IMAP based solutions.
Update
This bookmarklet no longer works. See Benjamin Ziepert's update.
Original Answer
I decided to make a bookmarklet to help automate this.
javascript:window.location="https://gmail.com/#search/rfc822msgid:"+encodeURIComponent(window.document.body.innerHTML.match(/Message-ID: <(.*)>/i)[1])+"/"+encodeURIComponent(window.location.search.toString().slice(1).split('&').filter(function(x){return x.slice(0,3) == "th="})[0].slice(3));
Save this link on your bookmarks bar.
To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.
If anyone has suggestions for a clean way to do this without having to click show original, I'm all ears.
The "HexEncodeMessageID" that you refer to (and that occurs in links such as https://mail.google.com/mail/#inbox/14197d2548c9da1a) is unfortunately different from the RFC822 message ID (which occurs in the source of the email).
I do not know of any way to get a direct link to an email using the RFC822 message ID, but it is possible to search for a particular RFC822 message ID in Gmail (see GMail doc):
in:anywhere rfc822msgid:SomeID#SomeID.mail
You can turn this into a link:
https://mail.google.com/mail/#search/in%3Aanywhere+rfc822msgid%3ASomeID#SomeID.mail
(Don't forget that the message id should be URL-encoded. You can also just type the search in your GMail and copy the resulting URL afterwards.)
The problem with this link is that it does not send you to the mail directly, but to a search result page with a single hit. But this might be good enough for some applications.
The advantage is: The RFC822 is the same in your account and in the account of the sender. So if you want to refer to a given email in an email/chat, you can provide this search link (assuming the recipient also uses GMail). With the "HexEncodeMessageID" this would not work, because it is different in every account (according to my own experiments).
One last thing: the link only works when you are already logged in.
Here's an updated bookmarklet over what Benjamin Ziepert suggested. Basically with removed /u/0 part to make it a little more account-independent.
javascript:window.open("https://mail.google.com/mail/#search/rfc822msgid%3A" + encodeURIComponent(document.getElementsByClassName('message_id')[0].innerHTML.slice(4, -4)), "_self");
Usage: Save this link on your bookmarks bar. To get a direct link to a message, choose "Show original" on the dropdown for that message, and then click the bookmarklet on the new page that opens.

Is there a way to disable email engines from automatically hyperlinking a URL?

One of my clients wants to disable the URL to be shown as a hyperlinked URL, it has to be recognized as plain text, this is what I have tried:
ur<!comments>l
I have also tried to remove the <a></a> tag, as well as remove "http://" of the URL, none of them worked in Outlook. Outlook still recognized it as a hyperlink.
Anybody have any workaround here?
There is a zero-width non-breaking space that I like to use: 
I place it in strategic places so that the URL does not get recognized as a URL, like so: http://wwwdomain.com.
This strategy has worked for me across platforms and rendering clients. Its advantages are twofold: 1) it prevents the client from auto-rendering text as a link, and 2) unlike other "non-breaking" zero-width space ascii codes (ie ), it wraps the entire URL if your URL happens to need it (instead of just the parts after the zero-width space).
Try it out.
Credit belongs to my coworker, actually. Seems to work in all clients that we tested.
www.websitename.<img src="" width="0" height="0">com
An empty image tag with 0 width and 0 height. Insert it between the dot and the following text (in this case "com").
After we tried several things, he somehow suffered from a moment of inspiration/brilliance.
No visible spacing between the characters. Not sure what will happen if you copy/paste the string into a browser directly, though. It served my purpose of not allowing email clients to automatically make it a hyperlink, though.
This one worked for me. It is a combination of Scott's answer and David K. Hess's comment.
Break your url using <span>. However, you need to break it in a way that they are not matched as url when the mail client scans it.
eg: http<span>://</span><span>google.</span>com
You can turn off auto-hyperlinking in general. Here is a tutorial for Outlook 2007:
Turn automatic hyperlinking on or off
I have a similar issue with words like "chequed.com" and "interviewing.com" that are creating a hyperlink in my messages when I do not want it to.
The first step I took was to edit the HTML link tags.. but there weren't any.
After that, I went to the text in the email and added a very small space by using a fount of 8pt (im using an ESP, otherwise I would have gone with 1px)
This may help if you're having the same issue.
My solution for this is
http://...
I contacted Gmail's support and spoke with a department manager for Apple Care. This is expected behavior and cannot be prevented. These hacks no longer work, and if implemented could result in your IP being listed as a phishing operation. You're dancing around security issues here. I would suggest revising your content strategy.
The only thing you can do currently is wrap all email addresses in mailto links and phone numbers in tel links. There are no other options available as of 2017.
I had success with janusoo's solution for years until for some reason it began to introduce line breaks on some clients. I found that I could proceed with ​
www.websitename.​com
You might try using CSS to re-flow the text.
<p>www.example.<span style="float:left">http://</span>com/</p>
If the part with "http://" still gets marked as a URL, try breaking things up in different places.
One other trick would be to replace the periods with some other Unicode character that LOOKS like a period but actually isn't. For example, "⠄" (U-2840) is a Braille single-dot.
Alas (!) I don't have any Microsoft applications I can test this with, but good luck with it. :)
If you use . to replace your '.' in your hyperlinks you'll solve Outlook 2007 Hyperlinking the URL.

Share user messages from my app to twitter

In my app, I am designing to allow user share messages to twitter. But those messages could already exceeded the 140 character constraint put on tweets, what will be the best way to work around that?
You can't work around the limit. If the 140 characters are exceeded twitter would not accept the message. I suggest you use a tweet-shortener like I do for my app.
What it basically does is if the number of tweets => 140, strip it in half, create a html page containing the full tweet, send back the shortened tweet and the link to the app, then paste it.
But there are already third party tweet-shorteners available so you can try out any one.
http://www.google.com/search?gcx=w&sourceid=chrome&ie=UTF-8&q=tweet+shortener
http://www.google.com/search?gcx=w&sourceid=chrome&ie=UTF-8&q=tweet+longer
It seems like the standard here is to create a shortened URL to the full version of the message to put at the end of the tweet, then fill the remaining space with as much of the message you can fit in 140 characters (with option trailing ellipsis). So, like:
"This is my message I want to share, and it is really lon... http://my.shrturl.com/aJdD"
Also, take a look at TwitLonger maybe? http://www.twitlonger.com/

What does "?ref=ts" mean in a Facebook application URL?

When Facebook drives traffic to an application, it often append &ref=whatever to the query string. This is useful for figuring out which integration points are working or not. I've figured out what some of these mean. For example:
ref=bookmarks - the user clicked on a bookmark.
ref=game_my_recent - the user clicked on the upper portion of the games dashboard.
What does "ref=ts" mean? It accounts for a ton of traffic. I've viewed source on pages all over common Facebook pages and cannot find a match for ant piece of content generated by any of my applications.
Same question, posted by me on the Facebook developer forum:
http://forum.developers.facebook.com/viewtopic.php?id=54866
It means 'Top Search' (if you enter a query into the top, and then click on something, it will append ref=ts
As noted, ref=ts is appended to the url whenever a user makes a search in the Top Search input field.
Also note that people tend to copy/paste links in their website and blogs, without trimming useless GET strings.
So it is possible if you get a high number of referrers coming from the top search that they are in fact links that propagate outside of Facebook.

Resources