vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r9388: LJSUP-6589: Youtube accepts escaped para...

Committer: vsukhanov
LJSUP-6589: Youtube accepts escaped parameters, so %61utoplay=1 forces to play video.
U   trunk/cgi-bin/ljcom.pl
Modified: trunk/cgi-bin/ljcom.pl
===================================================================
--- trunk/cgi-bin/ljcom.pl	2010-08-24 11:04:31 UTC (rev 9387)
+++ trunk/cgi-bin/ljcom.pl	2010-08-25 03:22:45 UTC (rev 9388)
@@ -1684,6 +1684,12 @@
 
         # no autoplay
         $ok &&= $url !~ /autoplay=.+/i;
+
+        ## Youtube accepts escaped parameters in form "%61utoplay=1"
+        ## So embeded in LJ videos start to play.
+        require URI::Escape;
+        my $unesc_url = URI::Escape::uri_unescape($url);
+        $ok &&= $unesc_url !~ /autoplay=.+/i;
     }
 
     # same goes for photobucket

Tags: ljcom, pl, vadvs
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