Re: "may ignore markup"

On Wed, Mar 2, 2011 at 6:20 AM, Rijk van Geijtenbeek <rijk@opera.com> wrote:
>
> Hi,
>
> I just read through http://www.w3.org/TR/2011/WD-notifications-20110301/
>
> I'm not a developer myself, but one thing that struck me were the descriptions of the title and body parameters:
>
> title   DOMString        Primary text, or title, of the notification. The user agent may ignore any markup in this string and treat it as plain text.
> body    DOMString        Secondary text, or body, of the notification. The user agent may ignore any markup in this string and treat it as plain text.
>
> What does 'ignore' mean here? Could this:
>  "Example <foo> <strong>text</strong>"
>
> be shown literally as
>  "Example <foo> text <strong>text</strong>"
>
> or as
>  "Example <foo> text"
> (known HTML markup stripped)
>
> or as
>  "Example text"
> (any markup stripped)

I assume your "literal" example would not have the first 'text' there,
and just show the string uninterpreted.  If so, any of those would be
allowed by the spec as I read it.  I agree with you this is not a
great situation.

The reason it is written this way is to allow user agents to use
external notification libraries -- interest in supporting that type of
implementation is strong in the group. However different platform
notification schemes don't all do the same thing with respect to
markup.

For example, on Ubuntu, to quote from
https://wiki.ubuntu.com/NotificationDevelopmentGuidelines:
    Notify OSD also presents other text formatting (such as bold and
underlining) as plain text.
    For example, the text “<b>Please</b> read the <a
href="http://example.com/relnote">release notes</a>.”
    will appear as “Please read the release notes.”

The main point is that authors should not depend on formatting through
markup when using this API.  The group is also working on HTML-content
notifications as a separate spec, where full markup would be
supported.

 -John

Received on Wednesday, 2 March 2011 18:21:04 UTC