Is there a way to stop Microsoft Lync from detecting phone numbers in a web page, and adding its click to call icon to that phone number in Internet Explorer?
Obviously the client can disable this functionality in Internet Explorer, however I would like to disable this for all who visit a particular website, as it is not playing nicely with embedded fonts in use on the website.
To do this for Skype I would add the following meta tag into my web page’s header:
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
Thanks,
Peter
I’ve found a few options, but none are as simple or clean as adding a META tag to the page (which Microsoft absolutely should give us as an option).
Option #1: Insert markup into your phone number
Adding something like a blank
SPANinto the middle of a phone number is sufficient to throw off Lync’s detection. This is a highly manual option, as it requires you to edit every phone number on a page. But it could be handy for disabling one or two numbers on a page, while allowing any others to be detected.Option #2: Script away the additional markup
Lync appears to format phone numbers in a very predictable way. It wraps a
SPANaround the number using a (as far as I can tell) consistent class name, then appends anAanchor which contains the dialing icon.Given that very unique Guid used for the classname, you can target that with your own client script and hide it or do whatever. A jQuery approach to hide all Lync icons might look like:
UPDATE! Option #2a: Style away the additional markup
Using the same technique as the script example above, you can simply style away the offending anchor tag using CSS. This should be preferable to a script-based solution.
Option #3: Use a
TELanchor as a preemptive strikeThere is a standardized way to markup a phone number for compatibility with VOIP/dialing programs. It uses a standard
Aanchor with atel:protocol. This has the dual effect of not only disabling Lync’s intrusive markup, but also providing better support for anything that knows how to dial a number (Skype) and mobile devices (both iOS and Android).Now Lync users can still click the link, which will prompt them to “open” it with Lync, regardless of the browser they use (I’ve confirmed compatibility with IE9, Firefox and Chrome). This strikes me as the best of both worlds: compatibility with users’ telephony application, without trouncing all over your markup and layout.
Until Microsoft comes up with a META tag to solve these issues, we’ve opted for #3.
UPDATE: Incorporated the suggestion from @marsman57 for improvement to CSS option #2