diff --git a/gateway/platforms/matrix.py b/gateway/platforms/matrix.py index 5253c537259..9aee8622b84 100644 --- a/gateway/platforms/matrix.py +++ b/gateway/platforms/matrix.py @@ -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"} diff --git a/tests/gateway/test_matrix.py b/tests/gateway/test_matrix.py index 34388817655..116bb627032 100644 --- a/tests/gateway/test_matrix.py +++ b/tests/gateway/test_matrix.py @@ -1090,6 +1090,24 @@ class TestMatrixMarkdownToHtml: assert "" in result + assert "" in result + assert "" in result + assert "Item" in result + assert "Apples" in result + # --------------------------------------------------------------------------- # Helper: display name extraction