From a383698be506362ed35001e2533a375417943ee3 Mon Sep 17 00:00:00 2001 From: "DeepBlueV7.X" Date: Mon, 13 Feb 2023 21:36:52 +0100 Subject: [PATCH] Improve distinction between tags and their attributes in the rich text section (#1433) Originally the tags used to be bold, followed by a colon and separated into two columns in a table. This at least restores the table aspect, which makes it clear, that font is not an attribute (and similar). This seems to have gotten lost in the transition to the new design. Signed-off-by: Nicolas Werner --- .../newsfragments/1433.clarification | 1 + .../modules/instant_messaging.md | 29 +++++-------------- 2 files changed, 9 insertions(+), 21 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1433.clarification diff --git a/changelogs/client_server/newsfragments/1433.clarification b/changelogs/client_server/newsfragments/1433.clarification new file mode 100644 index 00000000..5bce3c4d --- /dev/null +++ b/changelogs/client_server/newsfragments/1433.clarification @@ -0,0 +1 @@ +Improve distinction between tags and their attributes in the rich text section. Contributed by Nico. diff --git a/content/client-server-api/modules/instant_messaging.md b/content/client-server-api/modules/instant_messaging.md index 4932e410..c892d48e 100644 --- a/content/client-server-api/modules/instant_messaging.md +++ b/content/client-server-api/modules/instant_messaging.md @@ -48,27 +48,14 @@ are listed, clients should translate the value (a `#` character followed by a 6-character hex color code) to the appropriate CSS/attributes for the tag. -`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)) - -`ol` -`start` - -`code` -`class` (only classes which start with `language-` for syntax -highlighting) +| 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)) | +| `ol` | `start` | +| `code` | `class` (only classes which start with `language-` for syntax highlighting) | Additionally, web clients should ensure that *all* `a` tags get a `rel="noopener"` to prevent the target page from referencing the