-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
Description
The {workflow_timeline} merge tag relies on the nl2br() feature to display correctly on a HTML page. Since Gravity PDF does not run any merge tags through nl2br(), this causes display issues in the PDF.
The following is a temporary workaround:
/**
* Reprocess the Gravity Flow workflow timeline so new lines are converted to <br> tags
*/
add_filter( 'gfpdf_pdf_field_content_html', function ( $value, $field, $entry, $form, $pdf_field ) {
if ( strpos( $field->content, '{workflow_timeline}' ) !== false ) {
return wp_kses_post( \GFCommon::replace_variables( $field->content, $form, $entry ) );
}
return $value;
}, 10, 5 );
It's not an elegant solution though, and we should research a more sustainable alternative.