0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Use non-greedy patterns in some cases for Facebook

This commit is contained in:
Mikalai Radchuk 2017-04-18 10:38:28 +03:00 committed by Matt Westcott
parent 94ca64fd95
commit 0cb717d48c

View File

@ -83,20 +83,20 @@ OEMBED_ENDPOINTS = {
"^http[s]?://(?:www\\.)?instagram\\.com/p/.+$"
],
"https://www.facebook.com/plugins/video/oembed.{format}": [
"^https://(?:www\\.)?facebook\\.com/.+/videos/.+$",
"^https://(?:www\\.)?facebook\\.com/.+?/videos/.+$",
"^https://(?:www\\.)?facebook\\.com/video\\.php\\?(?:v|id)=.+$",
],
"https://www.facebook.com/plugins/post/oembed.{format}": [
"^https://(?:www\\.)?facebook\\.com/.+/(?:posts|activity)/.+$",
"^https://(?:www\\.)?facebook\\.com/.+?/(?:posts|activity)/.+$",
"^https://(?:www\\.)?facebook\\.com/photo\\.php\\?fbid=.+$",
"^https://(?:www\\.)?facebook\\.com/(?:photos|questions)/.+$",
"^https://(?:www\\.)?facebook\\.com/permalink\\.php\\?story_fbid=.+$",
"^https://(?:www\\.)?facebook\\.com/media/set/?\\?set=.+$",
"^https://(?:www\\.)?facebook\\.com/notes/.+/.+/.+$",
"^https://(?:www\\.)?facebook\\.com/notes/.+?/.+?/.+$",
# At the moment, not documented on https://developers.facebook.com/docs/plugins/oembed-endpoints
# Works for posts with a single photo
"^https://(?:www\\.)?facebook\\.com/.+/photos/.+$",
"^https://(?:www\\.)?facebook\\.com/.+?/photos/.+$",
],
"https://www.slideshare.net/api/oembed/2": [
"^http://www\\.slideshare\\.net/.+$"