WordPress.org

Ready to get started?Download WordPress

Forums

Responsive Video Light
[resolved] Bug Discovered (2 posts)

  1. f.macdonald
    Member
    Posted 1 year ago #

    Hello,

    the regex in this plugin cannot handle underscores in the video id e.g.

    http://www.youtube.com/watch?feature=player_embedded&v=B9sBlmY_iME

    it strips the _ resulting in a malformed id e.g.

    B9sBlmY

    to fix this update the regex expression in the youtube function at line 202 from

    if (preg_match('/^http:\/\/.*(v=([-0-9a-zA-Z]*)).*$/', $attribute, $matches))

    to

    if (preg_match('/^http:\/\/.*(v=([-0-9a-zA-Z_]*)).*$/', $attribute, $matches))

    http://wordpress.org/extend/plugins/responsive-video-light/

  2. billknechtel
    Member
    Plugin Author

    Posted 1 year ago #

    Howdy!

    Thanks for letting me know about the underscore being a part of YouTube's id character set. I've just rolled out version 1.1.0 of the plugin which adds the underscore to the regex as well as another unrelated feature. Please let me know if you run into any other issues!

    Kind Regards,
    Bill

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.