ueberdosis/tiptap

[Bug]: <col> Tags Are Not Self-Closed, Causing Backend HTML Parsers to Fail

Aberta

#6.226 aberto em 1 de abr. de 2025

 (2 comentários) (0 reação) (0 responsável)TypeScript (1.979 forks)batch import
area: editorcomplexity: easygood first issueimpact: medium

Métricas do repositório

Stars
 (23.454 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador