From 8a10a7cfc8a7a8f47ff099aed6a3a008bf8b5889 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 24 Sep 2025 16:05:45 -0400 Subject: [PATCH] Document intentional post-parsing data-play assignments --- js/channelProfile.js | 3 +++ js/subscriptions.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/js/channelProfile.js b/js/channelProfile.js index 42909fd5..21309171 100644 --- a/js/channelProfile.js +++ b/js/channelProfile.js @@ -382,6 +382,9 @@ async function loadUserVideos(pubkey) { `; + // Leave the data-play-* attributes empty in the template markup so the raw + // URL/magnet strings can be assigned after parsing without HTML entity + // escaping, keeping this renderer consistent with app.js. const interactiveEls = cardEl.querySelectorAll("[data-video-id]"); interactiveEls.forEach((el) => { if (!el.dataset) return; diff --git a/js/subscriptions.js b/js/subscriptions.js index 83e581b1..db4fc9a4 100644 --- a/js/subscriptions.js +++ b/js/subscriptions.js @@ -400,6 +400,9 @@ class SubscriptionsManager { t.innerHTML = cardHtml.trim(); const cardEl = t.content.firstElementChild; if (cardEl) { + // Leave the data-play-* attributes empty in the literal markup so we can + // assign the raw URL/magnet strings post-parsing without HTML entity + // escaping, mirroring the approach in app.js. const interactiveEls = cardEl.querySelectorAll("[data-video-id]"); interactiveEls.forEach((el) => { if (!el.dataset) return;