Skip to content

A self-hosted media server and file management system

fix: regex has super-linear performance due to backtracking

aminnausin2de6b649b2f4
diff --git a/resources/js/components/video/transcript/transcriptParser.ts b/resources/js/components/video/transcript/transcriptParser.ts
index 1dd33acc..8a444203 100644
--- a/resources/js/components/video/transcript/transcriptParser.ts
+++ b/resources/js/components/video/transcript/transcriptParser.ts
@@ -1,6 +1,6 @@
import { timestampToSeconds } from '@/components/video/transcript/transcriptUtil';
-const STRIP_TAGS = /<(?!\/?[iu]>|br\s*\/?>)[^>]*>/gi;
+const STRIP_TAGS = /<(?!\/?[iu]>|br\s*\/?>)[^<>]*>/gi;
export interface TranscriptLine {
index: number;