Filter caption for videos

Created on 4 December 2024, 6 months ago

Problem/Motivation

Seems that adding captions for remote videos don't filter the caption as the formatter for images does (with an Xss::filter).

Steps to reproduce

Add a caption to a video with something susceptible of having HTML on it, like a token, the caption will have HTML tags on it.

Proposed resolution

Add a Xss::filter to the caption.

See code in this MR:
https://www.drupal.org/project/glightbox_media_video/issues/3491410 📌 Filter caption for videos Active

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇷🇸Serbia levmyshkin Novi Sad, Serbia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @levmyshkin
  • Assigned to sorabh.v6
  • 🇮🇳India sorabh.v6 Indore

    Working on it.

  • 🇮🇳India sorabh.v6 Indore

    sorabh.v6 changed the visibility of the branch 3491533-filter-caption-for-videos to hidden.

  • 🇮🇳India sorabh.v6 Indore

    @levmyshkin I uploaded a video on youtube for testing and added alert tag and script tag in the subtitles and they were stripped off by the youtube itself. In the formatter setting, when I added custom caption and added <alert>this is test</alert> then in the node page, I was able to see this is test only as the caption and i do not see alert tag.

    I also went through the code and I do not see the need Xss::filter

Production build 0.71.5 2024