Skip to content

fix: prevent PDF export crash on tables with nested quotes in inline styles - #86

Open
Herafia wants to merge 7 commits into
mainfrom
fix/tcpdf-nested-quotes-crash
Open

fix: prevent PDF export crash on tables with nested quotes in inline styles#86
Herafia wants to merge 7 commits into
mainfrom
fix/tcpdf-nested-quotes-crash

Conversation

@Herafia

@Herafia Herafia commented Aug 25, 2026

Copy link
Copy Markdown

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 !45825
  • The PDF export would crash on tickets whose descriptions contained an html table with styles using url(‘...’) (nested quotes). The regular expressions in cleanTableHtml would break the html at these quotes, corrupting the table structure and causing tcpdf to lose track of the cells.

Fix: Replaced the regular expressions with DOMDocument/DOMXPath parsing in cleanTableHtml, which is robust against nested quotes.

@Herafia Herafia changed the title fix: prevent PDF export crash on tables with nested quotes in inline … fix: prevent PDF export crash on tables with nested quotes in inline styles Aug 25, 2026
@Herafia Herafia self-assigned this Aug 25, 2026
@Herafia
Herafia requested review from Rom1-B and stonebuzz August 25, 2026 12:17
Comment thread inc/simplepdf.class.php
@Herafia
Herafia requested a review from Rom1-B August 25, 2026 14:42
Comment thread tests/bootstrap.php Outdated
Comment thread phpunit.xml Outdated
Comment thread inc/simplepdf.class.php Outdated
Comment thread inc/simplepdf.class.php Outdated
Comment thread inc/simplepdf.class.php Outdated
@Herafia
Herafia requested a review from stonebuzz September 4, 2026 14:19
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