Skip to content

fix(export): escape non-HTML tags#36

Merged
stonebuzz merged 5 commits intopluginsGLPI:mainfrom
MyvTsv:ticket39136
Sep 30, 2025
Merged

fix(export): escape non-HTML tags#36
stonebuzz merged 5 commits intopluginsGLPI:mainfrom
MyvTsv:ticket39136

Conversation

@MyvTsv
Copy link

@MyvTsv MyvTsv commented Sep 8, 2025

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !39136
  • This PR fixes the behavior of PDF export when content contains non-HTML tags (such as XML or custom tags).

Before this change:
Unknown tags were removed by TCPDF when calling writeHTML().
This made the text unreadable if the content included XML or custom tags.

After this change:
Only basic HTML tags are interpreted and retained.
All other tags are escaped ( → <tag>) to appear as-is in the PDF.
The final rendering preserves the meaning of the text, and normal HTML tags continue to function.

Screenshots (if appropriate):

Knowlegde Base:
image

PDF File Before Fix:
image

PDF File After Fix:
image

@MyvTsv MyvTsv self-assigned this Sep 8, 2025
@MyvTsv MyvTsv requested a review from stonebuzz September 9, 2025 07:06
@MyvTsv MyvTsv marked this pull request as ready for review September 9, 2025 07:06
Co-authored-by: Stanislas <skita@teclib.com>
@stonebuzz
Copy link

Waiting for customer feedback

@stonebuzz stonebuzz merged commit 4e86afa into pluginsGLPI:main Sep 30, 2025
3 checks passed
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