Instead of adding a function to the JavaScript of each of your components to properly display HTML links, use an Angular2 pipe.

Create a pipe service called safe-url.pipe.ts and add the following:

Next, inject the pipe service in your app.module.ts:

And, in your Angular module declarations section:

Now, to use in your view: