• Resolved jaspercruz

    (@jaspercruz)


    Hi,

    The API is great however it fails when certain characters are used in the form; such as linebreaks, single quotes etc

    Is the JSON content escaped properly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thank god I thought I was going mad Here’s my topic

    Plugin Author Qube One ltd

    (@querysolutions)

    You can manipulate the data that is being sent using this filter
    There you can do whatever you like with the request

    For example:

    add_filter( ‘qs_cf7_api_get_args’ , ‘change_the_json_structure’ );
    
    function change_the_json_structure( $args ){
       $json = $args[‘body’];
       $json = stripslashes( $json );
       $args[‘body’] = $json; //this will probably break the json because in your example the json is escaped correctly
       //dont forget to return the args
       return $args;
    }
    • This reply was modified 6 years, 6 months ago by Qube One ltd.
    • This reply was modified 6 years, 6 months ago by Qube One ltd.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JSON Not escaped’ is closed to new replies.