mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 00:42:30 +00:00
Merge pull request #49 from PR0M3TH3AN/codex/add-comment-explaining-data-play-attributes
Explain post-template data-play attribute assignment
This commit is contained in:
1 file changed
+4
@@ -1736,6 +1736,10 @@ class bitvidApp {
|
||||
cardEl.dataset.torrentSupported = "true";
|
||||
}
|
||||
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
|
||||
// We intentionally leave the data-play-* attributes blank in cardHtml and
|
||||
// assign them after template parsing so the raw URL/magnet strings avoid
|
||||
// HTML entity escaping in the literal markup and keep any sensitive
|
||||
// magnet payloads out of the static DOM text.
|
||||
interactiveEls.forEach((el) => {
|
||||
if (!el.dataset) return;
|
||||
el.dataset.playUrl = playbackUrl || "";
|
||||
|
||||
Reference in new issue
Block a user