2

I am trying to generate skype links in a web page using Angular. If I hard-code the link with the skype username (e.g. <a href="skype:some_username?chat&topic=fubar">...) the link operates as expected and opens a dialog asking me what to do with external protocols.

But if I generate the link using skype:{{skype.user}} the link doesn't work and the status-bar reads unsafe: skype:some_username?chat&topic=fubar

  • Mac OSX 10.8.4
  • Chrome 28.0.1500.71

Plunked Here

I've checked chrome in groups, and skype support blog, also googled. I get lots of hits for links not working from within skype, but nothing about generated skype links failing.

This is a Duplicate

Plunked Solution Here

Community
  • 1
  • 1
Shanimal
  • 11,517
  • 7
  • 63
  • 76

2 Answers2

0

Try following code:

var app = angular.module("yourApp", []);

app.config(['$compileProvider',function($compileProvider) {
        $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|skype):/);
    }
]);

As well you can edit protocol list by using '|' in $compileProvider.aHrefSanitizationWhitelist() method.

0
.config( ['$compileProvider',function( $compileProvider )
  {

  $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|skype):/);

  }]);
Evgeniy Mishustin
  • 3,343
  • 3
  • 42
  • 81