From 7c4922dccac6174d9f7cd6c6f30bbe00710d8d84 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 26 Jan 2021 17:06:31 +0000 Subject: [PATCH] [FIX] website: update python dailymotion regex The regex was updated in JS with [1] but its python counterpart was forgotten during forward-port. [1]: https://github.com/odoo/odoo/pull/46898 closes odoo/odoo#65087 X-original-commit: 8d0b82683b95615267ff3acf84ebdd20456c595a Signed-off-by: Quentin Smetz (qsm) --- addons/website/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/tools.py b/addons/website/tools.py index 44530e3ce52..fa1eee4f473 100644 --- a/addons/website/tools.py +++ b/addons/website/tools.py @@ -22,7 +22,7 @@ def get_video_embed_code(video_url): # Regex for few of the widely used video hosting services ytRegex = r'^(?:(?:https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube(-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((?:\w|-){11})(?:\S+)?$' vimeoRegex = r'\/\/(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*' - dmRegex = r'.+dailymotion.com\/(video|hub|embed)\/([^_]+)[^#]*(#video=([^_&]+))?' + dmRegex = r'.+dailymotion.com\/(video|hub|embed)\/([^_?]+)[^#]*(#video=([^_&]+))?' igRegex = r'(.*)instagram.com\/p\/(.[a-zA-Z0-9]*)' ykuRegex = r'(.*).youku\.com\/(v_show\/id_|embed\/)(.+)'