Skip to content

Commit

Permalink
Merge pull request #2108 from srukle/srukle-patch-1973
Browse files Browse the repository at this point in the history
allow embeds from coub.com
  • Loading branch information
zorkian committed Apr 15, 2017
2 parents c13be2c + ab9b93b commit c93544d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cgi-bin/DW/Hooks/EmbedWhitelist.pm
Expand Up @@ -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 ],
Expand Down
3 changes: 2 additions & 1 deletion t/embed-whitelist.t
Expand Up @@ -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"; }

Expand Down Expand Up @@ -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" );
Expand Down

0 comments on commit c93544d

Please sign in to comment.