WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Salesforce Add-on
[resolved] Submitting (3 posts)

  1. gmcinnes
    Member
    Posted 1 year ago #

    Using the salesforce soap api method, users submitting forms that have things that should be escaped encounter errors. Specifically, submitting something like:

    This & this

    causes the Soap api to fail with:

    PHP Fatal error:  Uncaught SoapFault exception: [soapenv:Client] The entity name must immediately follow the '&' in the entity reference.

    My solution was to add a patch to call htmlentities on each form entry line.

    Patch included below

    1300c1300
    <             			$merge_vars[$var_tag] = htmlentities($entry[$field_id]);
    ---
    >             			$merge_vars[$var_tag] = $entry[$field_id];
    1305c1305
    <             				$merge_vars[$var_tag][] = htmlentities($value);
    ---
    >             				$merge_vars[$var_tag][] = $value;
    1311c1311

    http://wordpress.org/extend/plugins/gravity-forms-salesforce/

  2. gmcinnes
    Member
    Posted 1 year ago #

    Oops. That last patch was bad. Replace htmlentities call to htmlspecialchars

  3. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Updated in 2.0.2; thanks for the heads up!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic