GravityPDF / gravity-pdf

Gravity PDF is the ultimate third-party PDF automation tool for generating digital PDFs using the popular form-builder plugin Gravity Forms.
https://gravitypdf.com
89 stars 20 forks source link

Fix truncated merge tags in HTML attribute when included in PDF setting Rich Text fields #1562

Closed jakejackson1 closed 3 months ago

jakejackson1 commented 3 months ago

Description

Only field merge tags were being matched during rich text sanitizing. This adjustment now matches any merge tag with opening and closing {}, provided it is the only content included in a HTML attribute.

Testing instructions

  1. Add <img src="{user:user_profile_picture}" /> to Footer HTML field
  2. Save PDF settings
  3. Verify the merge tag hasn't been truncated

Checklist:

Additional Comments

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (hot-patch-6.11.2@f673065). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## hot-patch-6.11.2 #1562 +/- ## =================================================== Coverage ? 76.05% =================================================== Files ? 248 Lines ? 12999 Branches ? 370 =================================================== Hits ? 9887 Misses ? 3104 Partials ? 8 ```

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