webfactory/html5-tagrewriter
A lightweight PHP library that rewrites HTML5 elements into HTML4-compatible tags, helping legacy browsers render modern markup more reliably. It preserves content and attributes while offering a simple API for templates and content pipelines.
webfactory/html5-tagrewriter lets PHP DOMDocument parse and manipulate HTML5 markup without losing modern elements such as article, section, nav, or video. It rewrites unsupported HTML5 tags into safe placeholders before parsing, then restores the original tag names after processing, preserving structure, attributes, and content.
How can I help you explore Laravel packages today?