webstatus.dev icon indicating copy to clipboard operation
webstatus.dev copied to clipboard

Use description_html from web-features for nicer descriptions

Open foolip opened this issue 1 year ago • 1 comments

In web-features, description is plaintext, while description_html can have <code> and other markup for improved readability.

In the case of https://webstatus.dev/features/text-wrap-balance, "text-wrap: balance" is wrapped in <code> which makes it clear that text-wrap: balance is the syntax for this.

foolip avatar May 23 '24 13:05 foolip

This makes sense.

I held off because we will need to implement some security features first.

First, we will want to use something like https://github.com/microcosm-cc/bluemonday to sanitize the field. (I trust web-features but want to be extra careful)

In the lit app, we can then use unsafeHTML

Also, in the frontend server, we will want to add some Content-Security-Policy header

jcscottiii avatar May 23 '24 13:05 jcscottiii