GoogleChrome / webstatus.dev

A tool to monitor and track the status of all Web Platform features across dimensions that are related to availability and implementation quality across browsers, and adoption by web developers.
https://webstatus.dev
Apache License 2.0
74 stars 3 forks source link

Use description_html from web-features for nicer descriptions #315

Open foolip opened 1 month ago

foolip commented 1 month ago

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.

jcscottiii commented 1 month ago

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