Skip to content

fix: Escape HTML in error content#83

Merged
thetutlage merged 2 commits intopoppinss:4.xfrom
AylenHoz:feature/escape-html
Nov 28, 2025
Merged

fix: Escape HTML in error content#83
thetutlage merged 2 commits intopoppinss:4.xfrom
AylenHoz:feature/escape-html

Conversation

@AylenHoz
Copy link
Contributor

@AylenHoz AylenHoz commented Nov 26, 2025

🔗 Linked issue

Issue #84

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Some errors generated in applications explicitly mention HTML, such as React hydration mismatch errors. In these cases, Youch does not interpret the HTML as a string.

For example, the following error screen:

WhatsApp Image 2025-11-26 at 12 08 26 (1)

Should look like this:

WhatsApp Image 2025-11-26 at 12 08 26

Solution

Escape error content to avoid HTML interpretion.

Before:

WhatsApp Image 2025-11-26 at 12 08 27 (1)

After:

WhatsApp Image 2025-11-26 at 12 08 27

📝 Checklist

  • I have read the contribution guide.
  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link
Member

@RomainLanz RomainLanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thetutlage thetutlage merged commit 25ec074 into poppinss:4.x Nov 28, 2025
6 checks passed
@thetutlage
Copy link
Member

Looks great!

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