2.7.5 BUG: HTML field strips <script> tags [RESOLVED]

HTML content field strips “” on save thus frontend html is affected.

Screenshots of steps to recreate issue:

I’ve had this javascript in my forms for over a year and this is just now an issue.

This bug is the result of improvements added in 2.7.5. We do have an issue open with the product team regarding this and hope to have a fix out soon. You can keep an eye on the changelog for when the fix is available. In the meantime, you can run the following snippet as a hotfix…

add_filter( 'gform_disable_form_settings_sanitization', function( $disable_sanitization ) {

    GFCommon::log_debug( current_filter() . ": running hotfix for GH#3612" );
    $disable_sanitization = current_user_can( 'unfiltered_html' ) ? true : false;
    return $disable_sanitization;
} );

Will do and thanks for the snippet.