I have a custom URL protocol for an application I'm working on (as defined here: http://msdn.microsoft.com/en-us/library/aa767914.aspx). This protocol works fine, I can go to Start -> Run and type:
foo:1_1
And my application launches as expected. If I create a web page that has a link of that type, it works as expected (I get a warning from the browser, but that's no problem). My issue comes when I try and send an email from my program containing one of these links. Gmail, in particular, seems to be stripping out my link, so when I send an email that contains this link:
<a href='foo:1_1'>foo</a>
I'm left with this resulting HTML:
<a>foo</a>
It seems to be stripping out my href tag, which I'm guessing is because it doesn't recognize the protocol. Does anyone have any idea how I can get around this? I tested it with my ISP's email service, and the tag was left unmolested. Is this just something I'm going to have to live with, and tell my users to cut & paste the link into their Start -> Run box?
-
After some exploration, and seeing what another application does, I've come up with what seems like a suitable workaround:
Rather than a direct link to our protocol, we'll make a link to a page on our site where we pass the parameters, that page will then create the link using our protocol. This seems to be how iTunes does it when you send links through iTunes.
Jonas : Interestingly, this seems to work for all browsers but IE8 (unsure about IE7). FF and Chrome will dutifully open the link, but IE8 just gives me a generic "Internet Explorer cannot display the webpage" error. Bah!
0 comments:
Post a Comment