Skip to content

Fix HtmlToDjot table and reference escaping#175

Merged
dereuromark merged 1 commit intomasterfrom
feature/fix-html-to-djot-table-ref-escaping
Apr 2, 2026
Merged

Fix HtmlToDjot table and reference escaping#175
dereuromark merged 1 commit intomasterfrom
feature/fix-html-to-djot-table-ref-escaping

Conversation

@dereuromark
Copy link
Copy Markdown
Contributor

Summary

  • escape literal pipes in serialized table cells so single-cell content cannot split rows
  • fall back from unsafe reference-style links and images to inline syntax instead of emitting broken labels
  • strip internal data-djot-* markers from raw HTML inline fallbacks

Testing

  • vendor/bin/phpunit tests/TestCase/Converter/HtmlToDjotTest.php
  • vendor/bin/phpunit tests/TestCase/Converter/HtmlToDjotTest.php tests/TestCase/RoundTripTest.php tests/TestCase/DjotConverterTest.php tests/TestCase/ProfileTest.php
  • vendor/bin/phpstan analyse src --no-progress
  • composer cs-check
  • vendor/bin/phpunit

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.61%. Comparing base (e17f382) to head (906d65f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Converter/HtmlToDjot.php 76.47% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #175      +/-   ##
============================================
- Coverage     93.68%   93.61%   -0.08%     
- Complexity     3220     3241      +21     
============================================
  Files            93       93              
  Lines          8171     8203      +32     
============================================
+ Hits           7655     7679      +24     
- Misses          516      524       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dereuromark dereuromark merged commit f3f6a70 into master Apr 2, 2026
4 of 6 checks passed
@dereuromark dereuromark deleted the feature/fix-html-to-djot-table-ref-escaping branch April 2, 2026 02: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.

1 participant