GravityPDF / gravity-pdf

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
https://gravitypdf.com
89 stars 21 forks source link

Allow some HTML in product / option / shipping field labels #1485

Closed jakejackson1 closed 6 months ago

jakejackson1 commented 7 months ago

Description

Updates the Product table to allow some HTML in the field and choices labels.

For legacy reasons, $form_data auto-escapes HTML. To display HTML in field labels we need to unescape the info first, and then run it through wp_kses_post().

Testing instructions

  1. Add Product, Option, and Shipping fields to a form
  2. Include HTML in the label and option values
  3. Submit the form
  4. View a Core PDF
  5. Ensure the text is formatted correctly

Screenshots

Checklist:

Additional Comments

codecov[bot] commented 7 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (cd270c0) 75.13% compared to head (059ed62) 75.13%.

Files Patch % Lines
src/Helper/Fields/Field_Products.php 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #1485 +/- ## ============================================== Coverage 75.13% 75.13% Complexity 2953 2953 ============================================== Files 243 243 Lines 12882 12882 Branches 370 370 ============================================== Hits 9679 9679 Misses 3195 3195 Partials 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jakejackson1 commented 7 months ago

Notify https://secure.helpscout.net/conversation/2445795287/25696/ upon release