Is there a way to disable email engines from automatically hyperlinking a URL? - 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.

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!

How to replace string of a webpage using firefox addon?

I want to create an addon whose xpi installation will enable to replace a string of a website with other string.
For example , replacing all "the"s in a webpage with "change".
Actually, wanted to create an addon for a site due to which some complex word occuring multiple times could changed to a simpler word with a toolbar button click or by selection of the word and changing the word via clicking an option in the context-menu
Thnaks advance. Will give some more info if required.
This is a great question.
This is a simple thing to do, however it is very tricky to do it right. Right - means that it is done in a way that is safe from XSS attacks, and done very efficiently. It is common to see people not walking the tree, and doing all kinds of non-performant stuff.
What people do is copy paste this add-on and just modify the replaceText function -
https://addons.mozilla.org/en-US/firefox/files/browse/361576/file/data/content-script.js

Is '|' a recommended separator for semantic URLs?

After researching Google and SO, there seems to be conflicting opinions on this.
We have run-in to a problem with Google Chrome substituting | separator as %7C, whereas Firefox and Safari do not.
Here's an example:
http://www.example.com/page1|sub-page2|sub-page-3
Are there any strict rules to follow when choosing a separator character for semantic URLs and are there any strong arguments against (or workarounds when) using |?
| is not a valid character in a URL. Modern browsers will silently encode it to %7C when sending, and may or may not display this change in the address bar. Similarly, servers will silently decode the character for you.
This would have been a problem in last millennium, where browsers would crash just because you didn't specify http://, but today you can just use whatever you want and the browser will take care of it. However, automatic parsers such as http://example.com/test|fish Markdown may not agree to it being a valid URL. In this case, it looks like it does, but try that on my forums and it will complain at you.
Internet explorer/chrome use url encoding when displaying the url in the address bar after a page request has been made, %7C is the safe way of displaying a pipe ('|')
so its not a problem that chrome is doing this.
as a cheeky fix to make all browsers behave the same way, why not use %7C as your separator from the get-go, instead of a pipe, and then all browsers should interpret this as a pipe for you behind the scenes, but display it as &7C in the address bar.

pinterest link not working?

trying to create a pinterest link with javascript. It opens up pinterest, shows the correct images and description but when i click PIN IN it just refreshes and doesn't pin it.
Creating a custom link and heres a URL created that i think should be working -
http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fsandbox.modernactivity.co.uk%2Findependent_02%2F%3Fattachment_id%3D743&media=http%3A%2F%2Fsandbox.modernactivity.co.uk%2Findependent_02%2Fwp-content%2Fuploads%2F2012%2F06%2FBBC%20-%20MEAT-NEW%20WEBSITE%20TEST%204%3A3%20to%2016%3A9%20cropping-743-still-150x84.jpg&description=Independent%20Films%2C%20%E2%80%98Meat%E2%80%99&ref=http%3A%2F%2Fsandbox.modernactivity.co.uk%2Findependent_02%2Fdirectors%2Fdaniel-levi%2Fshowreels%2Flive-action%2Fvideo%2F743%2F%23
Anyone know what might be wrong?
best, Dan.
Okay.. Let me start with a disclaimer. This answer might not even be right, but it did work for me. I had the same problem and my URL has lots of '+' in it.. which the URL encoded equivalent for a ' '. So, essentially pinterest seems to have a problem "pinning" them, although there seems to be no problem in rendering them...
Your URI seems to have a lot of spaces too..
so, if the URI is in your control, you may
Create the uri after URLEncoding them
Make sure that spaces and such like dont appear on the URI.
Looking through my IIS Logs I noticed that Pinterest was redirecting users to my website without a leading http:// even if specified in the address, this seems to be causing the error for me. Unsure how to fix this in IIS, but thought I'd throw you a clue I found.

Delphi code for sanitizing a URL entered by the user

I need a user to be able to enter a URL, and would like to make sure it is as wholesome as possible. Things like checking that there is http:// at the front, no double-dots, perhaps valid TLD, trailing slash (I have to add the final page).
I figure this is such a common requirement that it must exist already. Suggestions?
[edit:] To be clear, this is a run-time requirement in a Windows Service. The aim is to get the best from the URL read from the configuration, rather than validate what the user typed in. In essence, if I can adjust the URL and make it work, then that is what I'd like to do. The download will be a specific file, so if it all goes wrong it won't get the wrong thing from another server by mistake.
How about using the PathIsURL function in the Windows API?
Update:
This is already wrapped in the Delphi RTL in the ShLwApi unit.
Have you had a look at "What is the best regular expression to check if a string is a valid URL"? It is not Delphi specific, but might get you started.
Perhaps some of the suggestions here might help.

Resources