Skip to content

Commit

Permalink
Merge pull request #120 from studiopress/update/deprecated-flag
Browse files Browse the repository at this point in the history
Add some sanitization back in
  • Loading branch information
kienstra authored May 6, 2022
2 parents 7a1035b + b16a986 commit e706c34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions php/Admin/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ public function enqueue_scripts() {
return;
}

$page = filter_input( INPUT_GET, 'page' );

// Enqueue scripts and styles on the edit screen of the Block post type.
if ( $this->slug === $page ) {
if ( filter_input( INPUT_GET, 'page' ) === $this->slug ) {
wp_enqueue_style(
$this->slug,
$this->plugin->get_url( 'css/admin.upgrade.css' ),
Expand Down
2 changes: 1 addition & 1 deletion php/Blocks/Controls/InnerBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function validate( $value, $echo ) {
$content = genesis_custom_blocks()->loader->get_data( 'content' );

return empty( $content )
? urldecode( filter_input( INPUT_GET, 'inner_blocks' ) )
? urldecode( wp_strip_all_tags( filter_input( INPUT_GET, 'inner_blocks' ) ) )
: $content;
}
}
4 changes: 1 addition & 3 deletions php/Blocks/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,7 @@ protected function render_block_template( $block, $attributes, $content ) {
$type = 'block';

// This is hacky, but the editor doesn't send the original request along.
$context = filter_input( INPUT_GET, 'context' );

if ( 'edit' === $context ) {
if ( 'edit' === filter_input( INPUT_GET, 'context' ) ) {
$type = [ 'preview', 'block' ];
}

Expand Down

0 comments on commit e706c34

Please sign in to comment.