XEP-0393: updates based on LC feedback

Sam Whited 2020-06-01 11:30:25 -04:00
parent caa2ad41ef
commit 13631dd0d4
1 changed files with 104 additions and 3 deletions

View File

@ -26,6 +26,18 @@
Add ability to disable styling, further clarify accessibility
considerations, and mention that Styling is not Markdown in the security
considerations section.
@ -255,6 +267,19 @@
<section1 topic='Discovering Support' anchor='disco'>
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.
<example caption='Disco info response'><![CDATA[
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:styling:0' />
<section1 topic='Business Rules' anchor='rules'>
<section2 topic='Blocks' anchor='block'>
@ -441,6 +466,39 @@
<section1 topic='Disabling Styling' anchor='disable'>
On rare occasions styling hints may conflict with the contents of a message.
For example, if the user sends the emoji "&gt; _ &lt;" it would be
interpreted as a block quote.
<section2 topic='Individual Directives'>
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.
<section2 topic='Entire Messages'>
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 &lt;unstyled&gt; element qualified by the
"urn:xmpp:styling:0" namespace.
<example caption='Sender indicates that styling is disabled'><![CDATA[
<body>&gt; _ &lt;</body>
<unstyled xmlns="urn:xmpp:styling:0"/>
<section1 topic='Implementation Notes' anchor='impl'>
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 &lt;em&gt; element.
<section1 topic='Security Considerations' anchor='security'>
@ -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.
<section1 topic='IANA Considerations' anchor='iana'>
@ -484,7 +552,40 @@
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>This specification requires no interaction with the &REGISTRAR;</p>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>This specification defines the following XML namespace:</p>
Upon advancement of this specification from a status of Experimental to a
status of Draft, the &REGISTRAR; shall add the foregoing namespace to the
registries located at &DISCOFEATURES;, as described in Section 4 of
<code caption='Service Discovery Features Registry Submission'><![CDATA[
<desc>Support for rendering message styling.</desc>
The &REGISTRAR; 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 &REGISTRAR; shall remove the provisional status from
this registry entry.
<code caption='Jabber/XMPP Protocol Namespaces Registry Submission'><![CDATA[
<section2 topic='Namespace Versioning' anchor='registrar-versioning'>
<section1 topic='XML Schema' anchor='schema'>
<p>This document does not define any new XML structure requiring a schema.</p>