jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
717 stars 147 forks source link

Output valid JSON only #807

Open dkindnes opened 7 months ago

dkindnes commented 7 months ago

Highcharts recommends only using valid JSON for chart options if the origin of the code can't be trusted. https://www.highcharts.com/docs/chart-concepts/security

So options should be put through JSON.parse()to validate it

This will throw an error if the JSON includes callback functions.

Is there a way to set a flag in Highcharter to validate the JSON at point of creation or disable use of callback functions? This would mean it won't be a problem later in the process, when trying to use it with Highcharts and a strict security policy?