Skip to content

Commit

Permalink
fix #1440
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Oct 9, 2024
1 parent a0ea4c5 commit 06d90fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/setup/iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package snow-monkey
* @author inc2734
* @license GPL-2.0+
* @version 25.4.6
* @version 27.2.4
*/

/**
Expand All @@ -13,7 +13,11 @@
'render_block',
function ( $block_content, $block ) {
if ( 'core/html' === $block['blockName'] ) {
if ( preg_match( '|^<iframe src="https://www.google.com/maps/embed?.+</iframe>$|ms', $block_content ) ) {
if (
preg_match( '|^<iframe src="https://www.google.com/maps/embed?.+</iframe>$|ms', $block_content )
|| preg_match( '|^<iframe ?.*? src="https://www.youtube.com/embed?.+</iframe>$|ms', $block_content )
|| preg_match( '|^<blockquote ?.*? data-instgrm-permalink="https://www.instagram.com/p?.+</script>$|ms', $block_content )
) {
return '<div>' . $block_content . '</div>';
}
}
Expand Down

0 comments on commit 06d90fa

Please sign in to comment.