Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r18155: LJSUP-7822 (Video from YouTube does not ...

Committer: ailyin
LJSUP-7822 (Video from YouTube does not appear in the post)
U   trunk/htdocs/update.bml
Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-01-31 10:11:10 UTC (rev 18154)
+++ trunk/htdocs/update.bml	2011-01-31 10:21:01 UTC (rev 18155)
@@ -141,7 +141,7 @@
         ## currently, the URL is for YouTube only.
         ## in future support for other quick embeds will be added.
         ## TODO: use oEmbed for YouTube (http://apiblog.youtube.com/2009/10/oembed-support.html)
-        if ($url =~ m!http://www.youtube.com/watch\?v=(\w+)! || $url =~ m!http://www.youtube.com/v/(\w+)!) {
+        if ($url =~ m!http://www.youtube.com/watch\?v=([\w\-]+)! || $url =~ m!http://www.youtube.com/v/([\w\-]+)!) {
             $event .= <<"EMBED";
 <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
 EMBED

Tags: andy, bml, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments