Use regex to remove br tag
This commit is contained in:
parent
39f16d95cb
commit
13a6b9b549
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ export function getFormattedMeetingId(videoCallData: VideoCallData): string {
|
||||||
export function stripHtml(html: string): string {
|
export function stripHtml(html: string): string {
|
||||||
const aLinkRegExp = /<a[\s\w="_:#;]*href="([^<>"]*)"[\s\w="_:#;]*>([^<>]*)<\/a>/g;
|
const aLinkRegExp = /<a[\s\w="_:#;]*href="([^<>"]*)"[\s\w="_:#;]*>([^<>]*)<\/a>/g;
|
||||||
return html
|
return html
|
||||||
.replace("<br />", "\n")
|
.replace(/<br\s?\/>/g, "\n")
|
||||||
.replace(aLinkRegExp, "$2: $1")
|
.replace(aLinkRegExp, "$2: $1")
|
||||||
.replace(/<[^>]+>/g, "");
|
.replace(/<[^>]+>/g, "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue