# NousResearch/hermes-agent · Matrix HTML sanitizer missing table tag allowlist

## Open now

- Nothing open on GitHub.

A bug was reported and multiple fixes proposed for table-related HTML tags being absent from the Matrix HTML sanitizer's ALLOWED_TAGS list, causing markdown tables to be stripped. The members consistently address this single missing-allowlist issue.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #45631. Verify it addresses your case.
- **Recommended:** read PR #45631 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #45421: \[Bug\]: markdown tables stripped by _MatrixHtmlSanitizer — table tags missing from ALLOWED_TAGS

## Prior & competing PRs

- **#45631: fix(matrix): preserve markdown table structure**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `gateway/platforms/matrix.py`, `tests/gateway/test_matrix.py`
  - fix hunks:
  - `gateway/platforms/matrix.py`

    ```diff
    @@ -209,7 +209,7 @@ class _MatrixHtmlSanitizer(HTMLParser):
         _ALLOWED_TAGS = {
             "a", "b", "blockquote", "br", "code", "del", "em", "h1", "h2", "h3",
             "h4", "h5", "h6", "hr", "i", "li", "ol", "p", "pre", "s", "strike",
    -        "strong", "ul",
    +        "strong", "table", "tbody", "td", "th", "thead", "tr", "ul",
         }
         _VOID_TAGS = {"br", "hr"}
     
    ```
  - `tests/gateway/test_matrix.py`

    ```diff
    @@ -1090,6 +1090,24 @@ def test_matrix_markdown_preserves_code_fences(self):
             assert "<code" in result
             assert "print" in result
     
    +    def test_matrix_markdown_preserves_table_structure(self):
    +        table = "\n".join(
    +            [
    +                "| Item | Quantity |",
    +                "| --- | --- |",
    +                "| Apples | 4 |",
    +                "| Bread | 1 |",
    +            ]
    +        )
    +
    +        result = self.adapter._markdown_to_html(table)
    +
    +        assert "<table>" in result
    +        assert "<thead>" in result
    +        assert "<tbody>" in result
    +        assert "<th>Item</th>" in result
    +        assert "<td>Apples</td>" in result
    +
     
     # ---------------------------------------------------------------------------
     # Helper: display name extraction
    ```
- **#45431: fix(matrix): preserve markdown table structure**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#45631`
- **#45530: fix: add missing HTML table tags to Matrix sanitizer allowlist**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#45631`

## Fix status

- Merged to main in PR #45631 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-06-13`.
- Subsystem: `gateway`
