From e8a8548cbc5524a368a9c9d2842914726d0634aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 5 Mar 2024 13:07:28 +0100 Subject: [PATCH] Deprecate the `font` HTML tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rationale: MSC4077 allows to deprecate HTML tags that are deprecated in the WHATWG standard, if they can be replaced by tags with the same feature. `font` is deprecated and can be replaced by `span` with the `data-mx-bg-color` and `data-mx-color` attributes. Signed-off-by: Kévin Commaille --- content/client-server-api/modules/instant_messaging.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/content/client-server-api/modules/instant_messaging.md b/content/client-server-api/modules/instant_messaging.md index fd05b74b..fa064621 100644 --- a/content/client-server-api/modules/instant_messaging.md +++ b/content/client-server-api/modules/instant_messaging.md @@ -43,10 +43,10 @@ were limited to `m.text`, `m.emote`, `m.notice`, and Clients should limit the HTML they render to avoid Cross-Site Scripting, HTML injection, and similar attacks. The strongly suggested set of HTML tags to permit, denying the use and rendering of anything else, is: -`font`, `del`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `blockquote`, `p`, -`a`, `ul`, `ol`, `sup`, `sub`, `li`, `b`, `i`, `u`, `strong`, `em`, -`s`, `code`, `hr`, `br`, `div`, `table`, `thead`, `tbody`, `tr`, -`th`, `td`, `caption`, `pre`, `span`, `img`, `details`, `summary`. +`del`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `blockquote`, `p`, `a`, `ul`, +`ol`, `sup`, `sub`, `li`, `b`, `i`, `u`, `strong`, `em`, `s`, `code`, +`hr`, `br`, `div`, `table`, `thead`, `tbody`, `tr`, `th`, `td`, +`caption`, `pre`, `span`, `img`, `details`, `summary`. {{% boxes/note %}} {{% added-in v="1.10" %}} @@ -65,7 +65,6 @@ the tag. | Tag | Permitted Attributes | |--------|--------------------------------------------------------------------------------------------------------------------------------------------| -| `font` | `data-mx-bg-color`, `data-mx-color`, `color` | | `span` | `data-mx-bg-color`, `data-mx-color`, `data-mx-spoiler` (see [spoiler messages](#spoiler-messages)) | | `a` | `name`, `target`, `href` (provided the value is not relative and has a scheme matching one of: `https`, `http`, `ftp`, `mailto`, `magnet`) | | `img` | `width`, `height`, `alt`, `title`, `src` (provided it is a [Matrix Content (`mxc://`) URI](#matrix-content-mxc-uris)) |