Skip to content

Commit

Permalink
Move stripslashes_deep to CMB2_Sanitize, its natural home.
Browse files Browse the repository at this point in the history
  • Loading branch information
clifgriffin committed Jan 27, 2015
1 parent 337874f commit 55cce39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMB2.php
Expand Up @@ -391,7 +391,7 @@ public function render_hidden_fields() {
*/
public function save_fields( $object_id = 0, $object_type = '', $data_to_save ) {

$this->data_to_save = stripslashes_deep($data_to_save);
$this->data_to_save = $data_to_save;
$object_id = $this->object_id( $object_id );
$object_type = $this->object_type( $object_type );

Expand Down
2 changes: 1 addition & 1 deletion includes/CMB2_Sanitize.php
Expand Up @@ -27,7 +27,7 @@ class CMB2_Sanitize {
*/
public function __construct( CMB2_Field $field, $value ) {
$this->field = $field;
$this->value = $value;
$this->value = stripslashes_deep($value); // get rid of those evil magic quotes
}

/**
Expand Down

0 comments on commit 55cce39

Please sign in to comment.