Skip to content

Commit a7f9567

Browse files
authored
Add YouTube NoCookie domain, fixes #826
1 parent 262b3d5 commit a7f9567

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/validator-rules-mixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ define([
193193

194194
href = (href || '').replace(/^\s+/, '').replace(/\s+$/, '');
195195

196-
return validateIsUrl(href) && (href.match(/youtube\.com|youtu\.be/) || href.match(/vimeo\.com/));
196+
return validateIsUrl(href) && (href.match(/youtube\.com|youtu\.be|youtube-nocookie\.com/) || href.match(/vimeo\.com/));
197197
},
198198
$.mage.__('Please enter a valid video URL.')
199199
);
@@ -208,7 +208,7 @@ define([
208208
href = (href || '').replace(/^\s+/, '').replace(/\s+$/, '');
209209

210210
return validateIsUrl(href) && (
211-
href.match(/youtube\.com|youtu\.be/) ||
211+
href.match(/youtube\.com|youtu\.be|youtube-nocookie\.com/) ||
212212
href.match(/vimeo\.com/) ||
213213
href.match(/\.(mp4|ogv|webm)(?!\w)/)
214214
);

0 commit comments

Comments
 (0)