Skip to content

Commit

Permalink
Adds esc_html for text being output
Browse files Browse the repository at this point in the history
  • Loading branch information
verticalgrain committed Jan 28, 2020
1 parent 8ce8957 commit 5d6083f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmb2-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public function before_form( $cmb_id, $object_id, $object_type, $cmb ) {
$fields_selector = apply_filters( 'cmb2_tabs_tab_' . $tab['id'] . '_fields_selector', $fields_selector, $tab, $cmb_id, $object_id, $object_type, $cmb );
?>

<div id="<?php echo $cmb_id . '-tab-' . $tab['id']; ?>" class="cmb-tab" data-fields="<?php echo implode( ', ', $fields_selector ); ?>">
<div id="<?php echo esc_html( $cmb_id ) . '-tab-' . esc_html( $tab['id'] ); ?>" class="cmb-tab" data-fields="<?php echo esc_html( implode( ', ', $fields_selector ) ); ?>">

<?php if( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ) :
$tab['icon'] = strpos($tab['icon'], 'dashicons') !== false ? 'dashicons ' . $tab['icon'] : $tab['icon']?>
<span class="cmb-tab-icon"><i class="<?php echo $tab['icon']; ?>"></i></span>
<span class="cmb-tab-icon"><i class="<?php echo esc_html( $tab['icon'] ); ?>"></i></span>
<?php endif; ?>

<?php if( isset( $tab['title'] ) && ! empty( $tab['title'] ) ) : ?>
<span class="cmb-tab-title"><?php echo $tab['title']; ?></span>
<span class="cmb-tab-title"><?php echo esc_html( $tab['title'] ); ?></span>
<?php endif; ?>
</div>
<?php endforeach; ?>
Expand Down

0 comments on commit 5d6083f

Please sign in to comment.