diff --git a/src/View/Shortcodes/EmbedShortcodeProvider.php b/src/View/Shortcodes/EmbedShortcodeProvider.php index ba7fabc4f..f19529337 100644 --- a/src/View/Shortcodes/EmbedShortcodeProvider.php +++ b/src/View/Shortcodes/EmbedShortcodeProvider.php @@ -160,6 +160,17 @@ class EmbedShortcodeProvider implements ShortcodeHandler $arguments['style'] = 'width: ' . intval($arguments['width']) . 'px;'; } + // override iframe dimension attributes provided by webservice with ones specified in shortcode arguments + foreach (['width', 'height'] as $attr) { + if (!($value = $arguments[$attr] ?? false)) { + continue; + } + foreach (['"', "'"] as $quote) { + $rx = "/( +

A nice video

EOS ,