From 13631dd0d4a05cc2027c7186457fe71dc7903af6 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Mon, 1 Jun 2020 11:30:25 -0400 Subject: [PATCH] XEP-0393: updates based on LC feedback --- xep-0393.xml | 107 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/xep-0393.xml b/xep-0393.xml index 30ea69bd..494d44f3 100644 --- a/xep-0393.xml +++ b/xep-0393.xml @@ -26,6 +26,18 @@ styling &sam; + + 0.3.0 + 2020-06-02 + ssw + +

+ Add ability to disable styling, further clarify accessibility + considerations, and mention that Styling is not Markdown in the security + considerations section. +

+
+
0.2.2 2020-05-20 @@ -255,6 +267,19 @@ + +

+ Clients that support message styling MUST advertise the fact by including a + feature of "urn::xmpp:styling:0" in response to &xep0030; information + requests and in their &xep0115; profiles. +

+ + … + + … +]]> +

@@ -441,6 +466,39 @@ + +

+ On rare occasions styling hints may conflict with the contents of a message. + For example, if the user sends the emoji "> _ <" it would be + interpreted as a block quote. +

+ + +

+ To remove styling without removing the styling directives, a whitespace + character can be inserted after the opening styling directive and before + the closing styling directive (if applicable). + This whitespace character SHOULD be U+2060 WORD JOINER to prevent line + breaks between the character that was misinterpreted as a styling + directive and the text that it would otherwise style. +

+
+ +

+ An entire message may also have styling disabled to remove the need to + parse the message for styling in the first place. + Senders may indicate to the receiver that a particular message SHOULD NOT + be styled by adding an empty <unstyled> element qualified by the + "urn:xmpp:styling:0" namespace. +

+ + > _ < + + +]]> +
+

This document does not define a regular grammar and thus styling cannot be @@ -467,9 +525,12 @@ text more difficult to read for visually impaired users.

- Styled text may also be rendered poorly by screen readers. + Styled text may be rendered poorly by screen readers. When applying formatting it may be desirable to include directives to - exclude styling directives from being read. + exclude styling directives from being read, or to add markers to the final + output that have semantic meaning for screen readers. + For example, in an web based client an emphasis span might be converted to + an HTML <em> element.

@@ -477,6 +538,13 @@ Authors of message styling parsers should take care that improperly formatted messages cannot lead to buffer overruns or code execution.

+

+ Though message styling is not compatible with Markdown, some of its styles + are similar. + Markdown parsers often allow arbitrary HTML to be inserted into documents + and therefore MUST NOT be used to parse the format defined in this document + even if they are flexible enough to do so. +

@@ -484,7 +552,40 @@

-

This specification requires no interaction with the ®ISTRAR;

+ +

This specification defines the following XML namespace:

+
    +
  • urn:xmpp:styling:0
  • +
+

+ Upon advancement of this specification from a status of Experimental to a + status of Draft, the ®ISTRAR; shall add the foregoing namespace to the + registries located at &DISCOFEATURES;, as described in Section 4 of + &xep0053;. +

+ + urn:xmpp:styling:0 + Support for rendering message styling. + &xep0393; +]]> +

+ The ®ISTRAR; shall also add the foregoing namespace to the Jabber/XMPP + Protocol Namespaces Registry located at &NAMESPACES;. + Upon advancement of this specification from a status of Experimental to a + status of Draft, the ®ISTRAR; shall remove the provisional status from + this registry entry. +

+ + urn:xmpp:styling:0 + &xep0393; + provisional +]]> +
+ + &NSVER; +

This document does not define any new XML structure requiring a schema.