• Jorgu5

    (@internetoholik)


    Hey,

    Seems there is a huge issue, when using JSON template for the POST API, when I use single or double quotes, it keeps stripping it with backslash like that

    View post on imgur.com

    After each save it keeps adding a new backslash infinitely. The issue occurs with 5.5.1 and 5.5.0 CF7. With 5.4.2 it works fine.

    Best,
    T.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • +1

    UP

    +1

    I got the same issue with the latest version of CF7

    markhamwalrus

    (@markhamwalrus)

    has anyone solved this yet? I am experiencing this bug as well

    markhamwalrus

    (@markhamwalrus)

    Hey guys, I found a temporary solution that worked on my end. I added strip slashes on the plugin code and my api connections started to work again.

    disclaimer: If you want to try please backup your site, and do it at your own risk, I am not responsible for any problems caused.

    Line 151 of class-cf7-api-admin.php:

    $wpcf7_api_json_data_template = stripslashes($post->prop( 'json_template' ));

    Line 367 of class-cf7-api-admin.php:

    $properties['json_template'] = isset( $_POST["json_template"] ) ? stripslashes($_POST["json_template"]) : '';

    Line 406 of class-cf7-api-admin.php:
    $qs_cf7_data_json_template = stripslashes($WPCF7_ContactForm->prop( 'json_template' ));

    ^ @markhamwalrus Thanks – it looks like your fix is working for me

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Stripping double and single quotes with CF7 5.5+’ is closed to new replies.