The definition of properties such as content allow for HTML markup to be included. However, the spec does not require that the media type be specified. This leads to inconsistent results when the consumer doesn't know what to expect.
For example, if the "content" property *can* contain HTML, a consumer will be either stripping the HTML, sanitizing it, or displaying it directly. However, if a user enters something like "I had a great time at the View Source conference <o>", (<o> being an ascii representation of the conference logo), the consumer would need to HTML escape that before rendering it otherwise it would disappear from display. However there is no way to know whether the value is meant to be the literal text or interpreted as HTML.
Additionally, the current spec does not allow for different media types for summary and content, since the mediaType property lives next to those properties. The following example demonstrates the problem:
```
{
"@context": "http://www.w3.org/ns/activitystreams",
"type": "Note",
"mediaType": "text/html",
"summary": "Hello <o>!",
"content": "<b>Hello <o>!</b>"
}
```
My suggestion is to require that string values can *only* be plaintext, and if you want to have HTML for a value, then you enclose it in an object where you can specify mediaType. This would look something like the following, I'm open to suggestions on names:
```
{
"@context": "http://www.w3.org/ns/activitystreams",
"type": "Note",
"summary": "Plaintext summary, always HTML escaped <o> before displaying",
"content": {
"type": "Object",
"mediaType": "text/html",
"value": "<p>HTML content goes <b>here</b></p>"
}
}
```
WeChat ID
aaronpk_tv