Skip to content

Commit 1ddc07e

Browse files
committed
Replace blank SVG icons with Unicode check and cross in pros-cons block
SVG icons were being stripped by wp_kses_post(), causing blank circles. Use Unicode ✓ (✓) and ✗ (✗) characters instead. https://claude.ai/code/session_014oW9hEbbWi1nvD43nJn3AV
1 parent 9d2f51e commit 1ddc07e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

blocks/pros-cons/pros-cons.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blocks/pros-cons/pros-cons.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ function acf_pros_cons_process_list($html, $type = 'positive') {
1616
return '';
1717
}
1818

19-
// SVG icons (inline for performance - no extra HTTP requests)
20-
$check_icon = '<span class="acf-pros-cons__icon" aria-hidden="true"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg></span>';
21-
$x_icon = '<span class="acf-pros-cons__icon" aria-hidden="true"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span>';
19+
// Unicode icons for pros/cons
20+
$check_icon = '<span class="acf-pros-cons__icon" aria-hidden="true">&#x2713;</span>';
21+
$x_icon = '<span class="acf-pros-cons__icon" aria-hidden="true">&#x2717;</span>';
2222

2323
$icon = ($type === 'positive') ? $check_icon : $x_icon;
2424

0 commit comments

Comments
 (0)