WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Smart YouTube PRO] YouTube Link & Shortcodes

[Plugin: Smart YouTube PRO] YouTube Link & Shortcodes

  • Hi,

    the regular expression for parsing the YouTube Link (smartyoutube.php line 670) does not handle a YouTube link within a shortcode correctly. Might also affect Metacafe, Vimeo, etc. links but I didn’t test it.

    Example:

    [toggle]http://www.youtube.com/watch?v=someid[/toggle] results in ‘[/toggle]’ in $match[7] which ends up in $time in tag_youtube().

    [toggle]http://www.youtube.com/watch?v=someid [/toggle] works.

    See regexp explain: http://pastebin.com/de1DxtSq

    ===
    ( group and capture to \7:
    ———————————————————————-
    [^<\s]* any character except: ‘<‘, whitespace
    (\n, \r, \t, \f, and ” “) (0 or more
    times (matching the most amount
    possible))
    ———————————————————————-
    ) end of \7
    ===

    ‘[‘ should be part of the exception character set.

    Fix:
    ==
    http://pastebin.com/ThF8ZH7L

    Affected Smart Youtube Pro Versions: since 4.x most likely

    http://wordpress.org/extend/plugins/smart-youtube/

  • The topic ‘[Plugin: Smart YouTube PRO] YouTube Link & Shortcodes’ is closed to new replies.