Skip to content

[FIX] PdfLib: Fix Font Awesome Icons Removal from PDF Output

This MR should fix the Font Awesome Icons Removal from PDF Output. The issue comes from the PHP tidy extension implemented in the cleanHtml function, which removes all empty tags, including Font Awesome icons represented as <i class="fas fa-home"></i>

To resolve this issue, the following adjustments have been made:

  1. Added 'drop-empty-elements' => false to the default tidy configurations to prevent the removal of Font Awesome icons.
  2. Applied the fix $html = str_replace('&amp;#x', '&#x', $html); to correct the Unicode representation of Font Awesome icons.

Related task: https://avan.tech/item103375#threadId72810

Edited by Bruno Kambere

Merge request reports