Skip to content

Improve HTML processing for placeholders that are using formatting arguments #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

axunonb
Copy link
Member

@axunonb axunonb commented Jul 24, 2024

Resolves #45

  • Modified HtmlBodyBuilder constructor to replace placeholders before parsing HTML to avoid entity encoding issues.
  • Simplified ReplaceImgSrcByCid method in HtmlBodyBuilder.cs.
  • Updated GetConfiguredMailSmartFormatter in MailMergeMessage.cs to set ParseInputAsHtml to true.
  • Introduced new test methods SimpleHtmlContent and ConditionalHtmlContent in Message_Html.cs.
  • Corrected typos in comments

…guments

- Introduced new test methods `SimpleHtmlContent` and `ConditionalHtmlContent` in `Message_Html.cs`.
- Modified `HtmlBodyBuilder` constructor to replace placeholders before parsing HTML to avoid entity encoding issues.
- Simplified `ReplaceImgSrcByCid` method in `HtmlBodyBuilder.cs`.
- Updated `GetConfiguredMailSmartFormatter` in `MailMergeMessage.cs` to set `ParseInputAsHtml` to `true`.
- Corrected typos in comments
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.40%. Comparing base (7df5bf1) to head (cf99928).

Files Patch % Lines
Src/MailMergeLib/HtmlBodyBuilder.cs 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   94.41%   94.40%   -0.01%     
==========================================
  Files          39       39              
  Lines        1968     1965       -3     
==========================================
- Hits         1858     1855       -3     
  Misses        110      110              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@axunonb axunonb merged commit e7f1183 into main Jul 25, 2024
2 of 3 checks passed
@axunonb axunonb deleted the pr/process-html-body branch July 25, 2024 12:22
@axunonb
Copy link
Member Author

axunonb commented Jul 25, 2024

Release v5.12.2 is published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smart.Format extensions using characters < and > do not work
1 participant