From 2a85446f42682f04e2d0464c85cc74e82792268e Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Mon, 29 Jan 2018 16:50:35 +0100 Subject: [PATCH] MOBILE-2313 formattext: Use correct regex for Vimeo The new regex matches Moodle vimeo filter one --- www/core/directives/formattext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/core/directives/formattext.js b/www/core/directives/formattext.js index b74e2960da4..e014deadb6d 100644 --- a/www/core/directives/formattext.js +++ b/www/core/directives/formattext.js @@ -412,7 +412,7 @@ angular.module('mm.core') if (el.src && canTreatVimeo) { // Check if it's a Vimeo video. If it is, use the wsplayer script instead to make restricted videos work. - var matches = el.src.match(/https?:\/\/player\.vimeo\.com\/video\/([^\/]*)/); + var matches = el.src.match(/https?:\/\/player\.vimeo\.com\/video\/([0-9]+)/); if (matches && matches[1]) { var newUrl = $mmFS.concatenatePaths(site.getURL(), '/media/player/vimeo/wsplayer.php?video=') + matches[1] + '&token=' + site.getToken();