Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedding video with special character #32

Open
abdelrahman84 opened this issue Oct 11, 2019 · 0 comments
Open

embedding video with special character #32

abdelrahman84 opened this issue Oct 11, 2019 · 0 comments

Comments

@abdelrahman84
Copy link

Hello,

For youtube input video, if the video has special character like below:

https://www.youtube.com/watch?v=I5tMPyP6D5o&feature=youtu.be.

Youtube will embed as below:

"https://www.youtube.com/embed/I5tMPyP6D5o

However, using your library, the embedded video is
https://www.youtube.com/embed/I5tMPyP6D5o&feature

which is not opening.

So, actual output, should ignore any text after the special character.

To fix this in my local dev, I added a helper function to detect such string:

santize(video) {

if (video.indexOf('&') !== -1){
  var spliitedVideo = video.split('&')
  video = spliitedVideo[0]
  return video
}

}

Just thought of informing you. Still able to use the library with this function.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant