The regex patterns for dailymotion and youku were too permissive and
not specific enough for the way they were intended to be used.
The new regexes should correctly isolate the video ID from the URL
string and cover all embedding needs for the two providers.
There are also new test cases for specific embed URL variations.
For the initiating discussion and PR, see following link:
https://github.com/odoo/odoo/pull/44537#discussion_r753250276
task-2696033
closesodoo/odoo#82369
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor, website_sale
This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.
All the regexes are kept in a python tools file and are called in JS
using an RPC.
task-2154812
closesodoo/odoo#44537
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>