From ab9b93bcea0323acdf776723adb44a4e743d1311 Mon Sep 17 00:00:00 2001 From: srukle Date: Thu, 13 Apr 2017 12:45:16 -0500 Subject: [PATCH] allow embeds from coub.com --- cgi-bin/DW/Hooks/EmbedWhitelist.pm | 2 ++ t/embed-whitelist.t | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cgi-bin/DW/Hooks/EmbedWhitelist.pm b/cgi-bin/DW/Hooks/EmbedWhitelist.pm index c68ab80c79..aca82d998d 100755 --- a/cgi-bin/DW/Hooks/EmbedWhitelist.pm +++ b/cgi-bin/DW/Hooks/EmbedWhitelist.pm @@ -55,6 +55,8 @@ my %host_path_match = ( "bandcamp.com" => [ qr!^/EmbeddedPlayer/!, 1 ], "blip.tv" => [ qr!^/play/!, 1 ], + + "coub.com" => [ qr!^/embed/!, 1 ], "codepen.io" => [ qr!^/enxaneta/embed/!, 1 ], "www.criticalcommons.org" => [ qr!/embed_view$!, 0 ], diff --git a/t/embed-whitelist.t b/t/embed-whitelist.t index a88006a952..da691f1ce0 100644 --- a/t/embed-whitelist.t +++ b/t/embed-whitelist.t @@ -15,7 +15,7 @@ use strict; use warnings; -use Test::More tests => 66; +use Test::More tests => 67; BEGIN { $LJ::_T_CONFIG = 1; require "$ENV{LJHOME}/cgi-bin/ljlib.pl"; } @@ -85,6 +85,7 @@ note( "misc" ); # C test_good_url( "//codepen.io/enxaneta/embed/gPeZdP/?height=268&theme-id=0&default-tab=result" ); test_good_url( "http://www.criticalcommons.org/Members/china_shop/clips/handle-with-care-white-collar-fanvid/embed_view" ); + test_good_url( "http://coub.com/embed/x1xx2xxxxxX" ); # D test_good_url( "http://www.dailymotion.com/embed/video/x1xx11x" );