After digging a little deeper, I found that there is an action hook in Gravity Forms called gform_pre_submission
. This allows me to modify a posted value before creating an entry or running the confirmation (see documentation).
After that it was pretty basic:
add_action( 'gform_pre_submission_11', 'pre_submission_handler' );
function pre_submission_handler( $form ) {
$_POST['input_7'] = urlencode(rgpost( 'input_7' ));
}
This targets form ID 11 and replaces field 7 with an urlencoded version of field 7.
Job done 🙂