From 2507170816bbe32673eb195d82097cb63edd338e Mon Sep 17 00:00:00 2001 From: stairman06 <36215135+stairman06@users.noreply.github.com> Date: Tue, 29 Mar 2022 23:27:05 -0500 Subject: [PATCH] YouTube embed fix (#442) --- plugins/xss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xss.js b/plugins/xss.js index 44106d19..014e14dd 100644 --- a/plugins/xss.js +++ b/plugins/xss.js @@ -19,7 +19,7 @@ const options = { const allowedSources = [ { regex: - /^https?:\/\/(www\.)?youtube\.com\/embed\/[a-zA-Z0-9_]{11}(\?&autoplay=[0-1]{1})?$/, + /^https?:\/\/(www\.)?youtube(-nocookie)?\.com\/embed\/[a-zA-Z0-9_-]{11}(\?&autoplay=[0-1]{1})?$/, remove: ['&autoplay=1'], // Prevents autoplay }, ]