Skip to content

Commit

Permalink
Broadcasts: Strip slashes from attributes, which are added when an AJ…
Browse files Browse the repository at this point in the history
…AX call is made
  • Loading branch information
n7studios committed Dec 15, 2022
1 parent 8cd336a commit 5012aec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/blocks/class-convertkit-block-broadcasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,13 @@ public function render_ajax() {

// Build attributes array.
$atts = array(
'date_format' => sanitize_text_field( $_REQUEST['date_format'] ),
'limit' => sanitize_text_field( $_REQUEST['limit'] ),
'date_format' => stripslashes( sanitize_text_field( $_REQUEST['date_format'] ) ),
'limit' => stripslashes( sanitize_text_field( $_REQUEST['limit'] ) ),
'page' => absint( $_REQUEST['page'] ),
'paginate' => absint( $_REQUEST['paginate'] ),
'paginate_label_next' => stripslashes( sanitize_text_field( $_REQUEST['paginate_label_next'] ) ),
'paginate_label_prev' => stripslashes( sanitize_text_field( $_REQUEST['paginate_label_prev'] ) ),
'link_color' => sanitize_text_field( $_REQUEST['link_color'] ),
'link_color' => stripslashes( sanitize_text_field( $_REQUEST['link_color'] ) ),
);

// Parse attributes, defining fallback defaults if required
Expand Down

0 comments on commit 5012aec

Please sign in to comment.