Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output valid JSON only #807

Open
dkindnes opened this issue Dec 8, 2023 · 0 comments
Open

Output valid JSON only #807

dkindnes opened this issue Dec 8, 2023 · 0 comments

Comments

@dkindnes
Copy link

dkindnes commented Dec 8, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant