fix links

This commit is contained in:
_Bastler 2021-10-06 12:20:49 +02:00
parent 04db451cd9
commit a90cc514f0

View File

@ -4,7 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core';
export class UrlTextPipe implements PipeTransform {
httpPattern = /(\b(https?:\/\/)([-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]))/ig;
wwwPattern =/(^|[^\/])(www\.[\S]+(\b|$))/gim;
wwwPattern =/(^|[^\/>])(www\.[\S]+(\b|$))/gim;
transform(value: string): any {
value = value.replace(this.httpPattern, '<a href="$1" target="_blank">$3</a>');