From 2234e0b0978283f6c26ac4b0da71519a72e1e085 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 29 Aug 2018 12:38:15 -0600 Subject: [PATCH 1/3] Mention that clients should not be producing invalid HTML Fixes https://github.com/matrix-org/matrix-doc/issues/1595 --- specification/modules/instant_messaging.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index 079a4801d..f3deb2202 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -106,6 +106,11 @@ of tags they can render, falling back to other representations of the tags where For example, a client may not be able to render tables correctly and instead could fall back to rendering tab-delimited text. +In addition to not rendering unsafe HTML, clients should not emit unsafe HTML in events. +Likewise, clients should not generate HTML that is not needed, such as extra paragraph tags +surrounding text due to Rich Text Editors. HTML included in events should otherwise be valid, +such as having appropriate closing tags, valid attributes, and generally valid structure. + .. Note:: A future iteration of the specification will support more powerful and extensible message formatting options, such as the proposal `MSC1225 `_. From 60b97fcf26158f2ab05af4c98dc03d9df9dd6b30 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 29 Aug 2018 12:39:25 -0600 Subject: [PATCH 2/3] Changelog --- changelogs/client_server/newsfragments/1605.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/client_server/newsfragments/1605.clarification diff --git a/changelogs/client_server/newsfragments/1605.clarification b/changelogs/client_server/newsfragments/1605.clarification new file mode 100644 index 000000000..ce9f967d0 --- /dev/null +++ b/changelogs/client_server/newsfragments/1605.clarification @@ -0,0 +1 @@ +Clarify that clients should not be generating invalid HTML for formatted events. From b8f2c721dc9bfbd44b6545c96a99755b490e58a7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 30 Aug 2018 12:22:50 -0600 Subject: [PATCH 3/3] Clarify which attributes should be valid --- specification/modules/instant_messaging.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index f3deb2202..d6cc9f098 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -109,7 +109,8 @@ back to rendering tab-delimited text. In addition to not rendering unsafe HTML, clients should not emit unsafe HTML in events. Likewise, clients should not generate HTML that is not needed, such as extra paragraph tags surrounding text due to Rich Text Editors. HTML included in events should otherwise be valid, -such as having appropriate closing tags, valid attributes, and generally valid structure. +such as having appropriate closing tags, appropriate attributes (considering the custom ones +defined in this specification), and generally valid structure. .. Note:: A future iteration of the specification will support more powerful and extensible