This commit is contained in:
Gregoire Parant 2021-02-11 15:06:12 +01:00
parent 0d104cb307
commit c5916e7b6d
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ export class HtmlUtils {
textReturn.innerText = text; textReturn.innerText = text;
const urlRegex = /(https?:\/\/[^\s]+)/g; const urlRegex = /(https?:\/\/[^\s]+)/g;
text.replace(urlRegex, (url: string) => { text.replace(urlRegex, (url: string) => {
let link : HTMLAnchorElement = document.createElement('a'); const link : HTMLAnchorElement = document.createElement('a');
link.innerText = ` ${url}`; link.innerText = ` ${url}`;
link.href = url; link.href = url;
link.target = '_blank'; link.target = '_blank';