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

Project descriptions mishandle some table tags and attributes #1737

Open
jacius opened this issue Mar 1, 2025 · 0 comments
Open

Project descriptions mishandle some table tags and attributes #1737

jacius opened this issue Mar 1, 2025 · 0 comments
Labels

Comments

@jacius
Copy link

jacius commented Mar 1, 2025

Describe the bug

If a project description includes certain HTML tags and attributes in a <table>, those tags and attributes will be stripped or incorrectly displayed on the project page. Specifically:

  • <caption>. On the project page, it will be converted to literal text (&lt;caption&gt;...&lt;/caption&gt; in the page source) instead of an actual <caption> element.
  • <th scope="...">. On the project page, the <th> tags will have no scope attributes in the page source.

This issue is particularly significant because this markup is important for accessibility.

To Reproduce

  1. Create or edit a project.
  2. In the Description field, switch the editor to HTML mode, and enter code for a table, such as:
<table>
  <caption>
    Example table caption
  </caption>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Round 1</th>
      <th scope="col">Round 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">Alice</th>
      <td>1</td>
      <td>2</td>
    </tr>
    <tr>
      <th scope="row">Bob</th>
      <td>3</td>
      <td>4</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row" colspan="2">Total</th>
      <td>10</td>
    </tr>
  </tfoot>
</table>
  1. Save the project and view the project page.

Expected behavior

The project page should include a table with a proper <caption> element, and all <th> tags should have their scope attributes when the page's HTML source code is inspected.

@jacius jacius added the bug label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant