embedding video with special character
Opened this issue · 0 comments
abdelrahman84 commented
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,