Properly replace a link tags
This commit is contained in:
parent
e5d94e74a2
commit
39f16d95cb
1 changed files with 5 additions and 1 deletions
|
@ -25,5 +25,9 @@ export function getFormattedMeetingId(videoCallData: VideoCallData): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stripHtml(html: string): string {
|
export function stripHtml(html: string): string {
|
||||||
return html.replace("<br />", "\n").replace(/<[^>]+>/g, "");
|
const aLinkRegExp = /<a[\s\w="_:#;]*href="([^<>"]*)"[\s\w="_:#;]*>([^<>]*)<\/a>/g;
|
||||||
|
return html
|
||||||
|
.replace("<br />", "\n")
|
||||||
|
.replace(aLinkRegExp, "$2: $1")
|
||||||
|
.replace(/<[^>]+>/g, "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue