Skip to content

fix(templates/listItem): escape % in CSS filter values for vsprintf compatibility - #24

Merged
Arsalanulhaq merged 1 commit into
masterfrom
ms/dev/fix-css-vsprintf
Mar 26, 2026
Merged

fix(templates/listItem): escape % in CSS filter values for vsprintf compatibility#24
Arsalanulhaq merged 1 commit into
masterfrom
ms/dev/fix-css-vsprintf

Conversation

@matsaur

@matsaur matsaur commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

The filter CSS property in the IONOS listItem.html template contained unescaped % characters (saturate(100%), invert(0%)).
vsprintf() attempted to interpret %) as a format specifier, causing a PHP warning and potentially corrupting the rendered output.
Escaped both occurrences to %% to match the convention already used throughout the template.
Test ### plan

  • Render the listItem template via vsprintf() with valid icon and text arguments and verify no PHP warnings are produced.
  • Visually verify the list item icon filter (black/forced color) renders correctly in an email client.

…ompatibility

Signed-off-by: Matthias Sauer <sauerm@strato.de>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a printf-formatting incompatibility in the IONOS listItem email template by escaping literal % characters inside inline CSS so the template can be safely formatted without warnings/corrupted output.

Changes:

  • Escaped percentage values in filter: from 100% / 0% to 100%% / 0%% for vsprintf/sprintf compatibility.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Arsalanulhaq Arsalanulhaq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked fine 👍

@Arsalanulhaq
Arsalanulhaq merged commit b79f954 into master Mar 26, 2026
19 of 21 checks passed
@Arsalanulhaq
Arsalanulhaq deleted the ms/dev/fix-css-vsprintf branch March 26, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants