Closed newz2000 closed 3 years ago
I found a solution: Wordpress apparently is known to aggressively add slashes to GPC variables so it provides a stripslashes_deep()
function. I tested it and this worked (super-forms-zapier.php):
if( !empty($settings['zapier_enable']) ) {
$url = $settings['zapier_webhook'];
if(isset($settings['zapier_exclude_settings']) && $settings['zapier_exclude_settings']=='true'){
$body = json_encode(
array(
'files'=>$files,
'data'=>stripslashes_deep($data)
)
);
}else{
$body = json_encode(
array(
'files'=>$files,
'data'=>stripslashes_deep($data),
'settings'=>$settings
)
);
}
Hi, thanks, this is now fixed in the latest version of the Add-on.
Hello, thanks for the great plugins. I have purchased from Envato Elements and it is very comprehensive. I am using the Zapier plugin to submit the data from forms and the end result has an extra \ before every single quote and two extra \ before every double quote.
For example, I used Webhook.site to test the output and you'll see in the value and label fields, the raw data includes an extra slash or two.
I looked through the code but I cannot find where the data is escaped at, so I do not know where to look to suggest a fix.
Please let me know if I can help test it further.
I am using the latest Wordpress with PHP 7.4.3 and nginx + PHP-fpm on Ubuntu 20.04.