summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-03-21 13:58:37 +0100
committerChristophe Simonis <chs@odoo.com>2019-03-21 13:58:37 +0100
commit4eff0af02ef2c182793fce5f32d2d15f53a5fba7 (patch)
tree8790e0051f631240562a9408ccd5e2a5cd64782b /addons/website/static/src/js
parent45e3e432a3621cf03a38ce48562eb967f1ff76e0 (diff)
parent6878c9f3424f27df9b07a665f9c0f5ef6e254996 (diff)
[MERGE] forward port branch saas-12.1 up to 6878c9f3424
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/editor/snippets.options.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js
index f51dda964db..078bccc9f42 100644
--- a/addons/website/static/src/js/editor/snippets.options.js
+++ b/addons/website/static/src/js/editor/snippets.options.js
@@ -642,11 +642,11 @@ var FacebookPageDialog = weWidgets.Dialog.extend({
*/
_renderPreview: function () {
var self = this;
- var match = this.fbData.href.match(/^(?:https?:\/\/)?(?:www\.)?(?:fb|facebook)\.com\/(\w+)/);
+ var match = this.fbData.href.match(/^(?:https?:\/\/)?(?:www\.)?(?:fb|facebook)\.com\/(?:([\w.]+)|[^/?#]+-([0-9]{15,16}))(?:$|[\/?# ])/);
if (match) {
// Check if the page exists on Facebook or not
$.ajax({
- url: 'https://graph.facebook.com/' + match[1] + '/picture',
+ url: 'https://graph.facebook.com/' + (match[2] || match[1]) + '/picture',
statusCode: {
200: function () {
self._toggleWarning(true);