Skip to content

Commit

Permalink
Merge pull request #31 from Bynder/fix/GC-5065
Browse files Browse the repository at this point in the history
[GC-5065] Testing and tweaking
  • Loading branch information
CWDN authored Jun 13, 2024
2 parents 7c95300 + 3bfb117 commit 6bd8ded
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions includes/classes/admin/mapping/field-types/acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public function underscore_template( View $view ) {
}, $groupIds ) );

// Prepare and execute query to get all fields for all groups
$wild = '%' . $wpdb->esc_like( 'repeater' ) . '%';
$fields_results = $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM {$wpdb->posts} WHERE post_type = 'acf-field' AND post_content LIKE %s AND post_parent IN ($groupIdPlaceholders)",
'%' . $wpdb->esc_like('repeater') . '%',
$groupIds
array_merge( [ $wild ], $groupIds )
)
);

Expand Down
6 changes: 5 additions & 1 deletion includes/classes/admin/mapping/field-types/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ class="cw-column-selector"
<option value="">Select a column</option>

<?php
echo wp_kses_post( implode( '\r\n', $this->getAllTableColOptions() ) );
/**
* This is not escaped as it can contain various tags that we know are safe.
*/
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo implode( '\r\n', $this->getAllTableColOptions() );
?>
</select>

Expand Down

0 comments on commit 6bd8ded

Please sign in to comment.