Problem, if a video link has multiple parameters

Created on 29 October 2024, 24 days ago

Problem/Motivation

The second problem, if there are multiple parameters in the video link, for example https://www.youtube.com/watch?v=IDVIDEO&ab_channel=NAMCECHANNEL, when inserted, the & symbol is replaced by its representation and the video stops working

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain lelikone

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

Comments & Activities

  • Issue created by @lelikone
  • 🇫🇷France abdei Paris, Ile de France

    Hello @lelikone ,

    i ve pushed a new release that fixes that issue.
    pull the latest version 1.0.2

    Regards,
    Abdel

  • 🇫🇷France abdei Paris, Ile de France
  • 🇫🇷France abdei Paris, Ile de France
  • 🇪🇸Spain lelikone

    Hello @abdei

    Thanks for the update, but I keep getting the same problem. Also discovered one strange behavior. If I insert another site in the link string address, then an iframe is created in which the site is inserted, I need to add a check that it is youtube site and not another site.

    Regards, Lelikone

  • 🇫🇷France abdei Paris, Ile de France

    The "ckeditor5_youtube" module is built to create iframes specifically for YouTube links.

  • 🇪🇸Spain lelikone


    Here I attach a screenshot, where I just entered the address of any site and the frame was created with any site, no error or information is not issued. version 1.0.2 is installed.

  • 🇪🇸Spain lelikone

    const a = e.match(/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/);
    if (a && a[1]) {
    return o(`https://www.youtube.com/embed/${a[1]}`, l())
    }
    return e

    This part of the code works like this, if you inserted a link from youtube, it will return everything ok, but if there is no mention of youtube in the link, it will return the original link.

Production build 0.71.5 2024