WordPress.org

Forums

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

  1. f.macdonald
    Member
    Posted 2 years 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 2 years 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

  • Responsive Video Light
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.