From 3bec9c8ab100cf2b758f7c002fd5e1047e302ede Mon Sep 17 00:00:00 2001 From: Chris Olesen Date: Wed, 3 Jun 2020 07:26:36 +0200 Subject: [PATCH] Handle single quotes Fix single quotes for record type json --- contact-form-7-api.php | 2 +- includes/class-cf7-api-admin.php | 4 ++-- readme.txt | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contact-form-7-api.php b/contact-form-7-api.php index cba471c..9264c67 100644 --- a/contact-form-7-api.php +++ b/contact-form-7-api.php @@ -11,7 +11,7 @@ * Plugin Name: Contact form 7 to api + Basic auth * Plugin URI: https://github.com/kennym/cf7-to-api * Description: Connect contact forms 7 to remote API using GET or POST. - * Version: 1.4.5 + * Version: 1.4.6 * Author: Kenny Meyer * Author URI: https://www.kennymeyer.net * License: GPL-2.0+ diff --git a/includes/class-cf7-api-admin.php b/includes/class-cf7-api-admin.php index e31f210..9cb82ea 100644 --- a/includes/class-cf7-api-admin.php +++ b/includes/class-cf7-api-admin.php @@ -562,7 +562,7 @@ private function send_lead( $record , $debug = false , $method = 'GET' , $record $args['headers']['Content-Type'] = 'application/json'; - $json = $this->parse_json( $lead ); + $json = $this->parse_json( stripslashes ( $lead ) ); if( is_wp_error( $json ) ){ return $json; @@ -623,7 +623,7 @@ private function send_lead( $record , $debug = false , $method = 'GET' , $record $args['headers']['Content-Type'] = 'application/json'; - $json = $this->parse_json( $lead ); + $json = $this->parse_json( stripslashes( $lead ) ); if( is_wp_error( $json ) ){ return $json; diff --git a/readme.txt b/readme.txt index 64ed6a7..3cac044 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,10 @@ For example: Changelog --------- +### 1.4.6 + +- Handle single quotes + ### 1.4.5 - Handle line breaks