Skip to content

Stability and fallbacks with uncaught exception exists in HTML #16

@mathetos

Description

@mathetos
  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When a post or page contains HTML that causes the League HTML-to-Markdown converter to throw, the plugin does not catch the exception. The request fails with a fatal error (500) instead of returning markdown or a safe fallback, so the .md URL breaks instead of degrading gracefully.

To Reproduce

Step-by-step reproduction instructions

  1. Create or edit a post that includes HTML that triggers the League HTML-to-Markdown converter to throw (e.g., certain malformed structures, edge-case markup, or content that exposes bugs in the converter).
  2. Visit the post’s .md URL (e.g. https://yoursite.com/post-slug.md).
  3. The request fails with a PHP fatal error / 500 response instead of returning markdown.

Expected results

  1. The .md URL returns valid output (markdown or a plain-text fallback) instead of crashing.

Actual results

  1. The request throws an uncaught exception and returns a 500 error or PHP fatal error.

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other:

Used versions

  • Device you are using: web/Chrome
  • Operating system: Windows 11
  • PHP version: 8.3
  • WordPress version: 6.9.1
  • WordPress Theme: 2025
  • Plugin version: 1.0.0
  • Relevant plugins in case of a bug:

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions