File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Change log
1010
1111- Fixed the ``APPEND_SLASH `` handling to also use ``request.path_info ``, not
1212 ``request.path ``.
13+ - Added support for embedding YouTube shorts when using
14+ :mod: `feincms3.embedding `.
1315
1416
1517`3.5 `_ (2022-04-11)
Original file line number Diff line number Diff line change 1313YOUTUBE_RE = re .compile (
1414 r"""youtu(\.?)be(\.com)?/ # match youtube's domains
1515 (\#/)? # for mobile urls
16- (embed/)? # match the embed url syntax
16+ (embed/|shorts/|watch/ )? # match the embed/shorts/watch url syntax
1717 (v/)?
1818 (watch\?v=)? # match the youtube page url
1919 (ytscreeningroom\?v=)?
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ def test_youtube(self):
3434 "https://www.youtube.com/watch?v=DYu_bGbZiiQ&list=RDJMOOG7rWTPg&index=7"
3535 )
3636 )
37+ self .assertTrue (embed ("https://www.youtube.com/watch/ZumRshfKdtM" ))
38+ self .assertTrue (embed ("https://www.youtube.com/shorts/ZumRshfKdtM" ))
3739
3840 def test_vimeo (self ):
3941 """Vimeo video embedding works"""
You can’t perform that action at this time.
0 commit comments