[Bug]: <col> Tags Are Not Self-Closed, Causing Backend HTML Parsers to Fail
#6226 aperta il 1 apr 2025
Metriche repository
- Star
- (23.454 star)
- Metriche merge PR
- (Merge medio 4g 13h) (46 PR mergiate in 30 g)
Descrizione
Affected Packages
@tiptap/extension-table
Version(s)
2.11.5
Bug Description
We’ve encountered an issue where the generated <col> elements inside tables are rendered as:
<col style="min-width: 25px">
This is not valid HTML5. The <col> tag is a [void element](https://developer.mozilla.org/en-US/docs/Glossary/Void_element) and must be self-closing. It should be:
<col style="min-width: 25px" />
Problem
Our backend HTML parsers expect proper void tag declarations. The current form <col style="..."> is treated as invalid because it lacks a closing slash and is not self-closing, resulting in HTML parsing issues or broken rendering.
Example of Invalid Output
<colgroup>
<col style="min-width: 25px">
<col style="min-width: 25px">
<col style="min-width: 25px">
</colgroup>
Expected Output
<colgroup>
<col style="min-width: 25px" />
<col style="min-width: 25px" />
<col style="min-width: 25px" />
</colgroup>
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
Expected Output
<colgroup>
<col style="min-width: 25px" />
<col style="min-width: 25px" />
<col style="min-width: 25px" />
</colgroup>
Additional Context (Optional)
We are using https://github.com/yikoyu/vuetify-pro-tiptap/tree/master
Dependency Updates
- Yes, I've updated all my dependencies.