Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Hooks/Handlers/EditorBlockHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function pushNinjaTablesToEditorFooter()
title: '<?php esc_html_e('Insert Ninja Tables Shortcode', 'ninja-tables'); ?>',
select_error: '<?php esc_html_e('Please select a table', 'ninja-tables'); ?>',
insert_text: '<?php esc_html_e('Insert Shortcode', 'ninja-tables'); ?>',
tables: <?php echo json_encode($tables); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $tables is already escaped before being passed in. ?>,
tables: <?php echo wp_json_encode($tables); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $tables is already escaped before being passed in. ?>,
logo: '<?php echo esc_url(NINJA_TABLES_DIR_URL . 'assets/img/ninja-table-editor-button-2x.png'); ?>'
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions app/Modules/DataProviders/NinjaFooTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ private static function render($tableArray)
$cartItems = WC()->cart->get_cart();
?>
<script type="text/javascript">
window['ninjaTableCartItems'] = <?php echo json_encode($cartItems); ?>;
window['ninjaTableCartItems'] = <?php echo wp_json_encode($cartItems); ?>;
</script>
<?php
});
Expand Down Expand Up @@ -768,7 +768,7 @@ private static function addInlineVars($vars, $table_id, $table_instance_name)
add_action('wp_footer', function () use ($vars, $table_id, $table_instance_name) {
?>
<script type="text/javascript">
window['<?php echo esc_attr($table_instance_name);?>'] = <?php echo json_encode($vars, true); ?>
window['<?php echo esc_attr($table_instance_name);?>'] = <?php echo wp_json_encode($vars); ?>
</script>
<?php
});
Expand Down