WordPress.org

Ready to get started?Download WordPress

Forums

Smart YouTube PRO
YouTube Link & Shortcodes (1 post)

  1. 25th-floor
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic