powered-by-wq / vera

📑⚙️ Python/Django reference implementation of the ERAV data model
https://wq.io/vera
MIT License
21 stars 6 forks source link

Don't html-escape labels #6

Open tubaman opened 5 years ago

tubaman commented 5 years ago

In reports/new.json parameter labels are being html-escaped. Fix it so that the labels are left unescaped. Then mustache can do it's normal job of escaping the html

tubaman commented 5 years ago

Here's an example of fixing the html-escaping server side vs client/template-side

tubaman commented 5 years ago

I think this is probably closer to the right fix than using the verbatim mustache tags since this makes it correct in the json. If we go down this route, should we fix all wq_label_templates? I feel like anytime mustache templates could be used to render anything besides html(ex: json) they should render verbatim.

sheppard commented 5 years ago

Yes, this is the right approach. wq_label_template should always use verbatim tags, since it is always used to render JSON that is later put into a full template (which generally should not use verbatim tags).

tubaman commented 5 years ago

Ok, I think this is ready for review now.