/** * Minimal WebVTT-markup-to-safe-DOM sanitizer for cue text handed to us as a * plain string (dash.js's manual-rendering `cueEnter` event). Real VTTCue * objects (hls.js) skip this entirely via the native, browser-trusted * VTTCue.getCueAsHTML() — this exists only for the string-based path, where * the source is a remote manifest/subtitle file the embedding page didn't * necessarily choose, so we don't trust it as pre-sanitized HTML the way * dash.js's own sample code assigns it straight to an element's markup. * * Keeps WebVTT's own formatting tags (b/i/u/ruby/rt/rp/span/br, plus the VTT * class-span tag `c`) and drops everything else — script/img/event-handler * attributes, href/src/style — by unwrapping disallowed elements (their TEXT * survives, just not the tag) rather than dropping their content outright. */ /** * Karaoke cues carry the FULL final sentence after this delimiter so a renderer * can size the caption box to the finished line from the first word (see the * min-width anchoring in CanvasRenderer). Only the part BEFORE it is ever * visible text — a renderer that doesn't do the anchoring must still cut it off, * or the marker and the whole upcoming sentence print on screen. */ export declare const KARAOKE_GHOST_DELIM = "\u27E8\u27E8GHOST\u27E9\u27E9"; /** The visible half of a (possibly) karaoke cue. */ export declare function stripKaraokeGhost(text: string): string; export declare function sanitizeVttHtml(html: string): DocumentFragment; //# sourceMappingURL=sanitizeVttHtml.d.ts.map