Skip to content

Commit f7fa95b

Browse files
committed
fix regexp for youtube id
1 parent b913e11 commit f7fa95b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DeepThought/youtube.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CMS.registerEditorComponent({
88
widget: "string"
99
},
1010
],
11-
pattern: /{{ youtube\(id="([a-zA-Z0-9]+)"\) }}/,
11+
pattern: /{{ youtube\(id="([-_a-zA-Z0-9]+)"\) }}/,
1212
fromBlock: function(match) {
1313
return {
1414
id: match[1],

src/built-in/youtube.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CMS.registerEditorComponent({
2323
widget: "string"
2424
},
2525
],
26-
pattern: /{{ youtube\(id="([-a-zA-Z0-9]+)"(, playlist="([a-zA-Z0-9]+)")?(, autoplay=(true|false))?(, class="([a-zA-Z][-_.:a-zA-Z0-9 ]*)")?\) }}/,
26+
pattern: /{{ youtube\(id="([-_a-zA-Z0-9]+)"(, playlist="([-_a-zA-Z0-9]+)")?(, autoplay=(true|false))?(, class="([a-zA-Z][-_.:a-zA-Z0-9 ]*)")?\) }}/,
2727
fromBlock: function(match) {
2828
return {
2929
id: match[1],

0 commit comments

Comments
 (0)