Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(web): escape signed URLs in DASH manifest attributes
Richie McIlroyedab77be2741
diff --git a/apps/web/lib/video-convert.ts b/apps/web/lib/video-convert.tsindex efa43ae66..6a842cfc3 100644--- a/apps/web/lib/video-convert.ts+++ b/apps/web/lib/video-convert.ts@@ -66,6 +66,23 @@ function resolveResourceUrl(return withQuery(new URL(resource, baseUrl).toString(), query);}+function escapeXmlAttribute(value: string): string {+ return value.replace(/[&<>"']/g, (char) => {+ switch (char) {+ case "&":+ return "&";+ case "<":+ return "<";+ case ">":+ return ">";+ case '"':+ return """;+ default:+ return "'";+ }+ });+}+async function materializeHlsPlaylist(playlistUrl: string,dirPath: string,@@ -162,7 +179,7 @@ async function materializeMpdManifest(/(initialization|media)="([^"]+)"/g,(_, attribute: string, resource: string) => {const resolved = resolveResourceUrl(resource, baseUrl, query);- return `${attribute}="${resolved}"`;+ return `${attribute}="${escapeXmlAttribute(resolved)}"`;},);