Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Table) Captions with Heading content results in a stripped table #73

Closed
codebymikey opened this issue Aug 4, 2022 · 3 comments · Fixed by #74
Closed

(Table) Captions with Heading content results in a stripped table #73

codebymikey opened this issue Aug 4, 2022 · 3 comments · Fixed by #74

Comments

@codebymikey
Copy link
Contributor

In HTML5, captions may contain any flow content excluding descendent table elements- https://html.spec.whatwg.org/multipage/tables.html#the-caption-element

Meaning:

<table>
  <caption><h3>Monthly savings</h3></caption>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>

is perfectly valid HTML, but it results in the entire table being stripped out instead:

<h3>Monthly savings</h3>
  Month
    Savings
  January
    $100
  

Related issue: ezyang/htmlpurifier#131

@codebymikey
Copy link
Contributor Author

When this is resolved, are there any plans to create a new release for the table support added as part of #70?

It's at least better than losing all your captioned tables.

codebymikey added a commit to codebymikey/htmlpurifier-html5 that referenced this issue Aug 4, 2022
@xemlock
Copy link
Owner

xemlock commented Aug 4, 2022

Hi @codebymikey,
I plan to make a release (0.1.12) when the support for form input types (#59) is ready. Ideally I'd like to finish working on it by the end of the summer (around last week of September).

Is this timeline acceptable to you?

@codebymikey
Copy link
Contributor Author

Yeah that's fine, a beta pre-release would be ideal, but if not I can just stick to dev for now until 0.1.12 is stable.

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 a pull request may close this issue.

2 participants