Escaped quotes, e.g in formatters, break export
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Reproduce the export with the two JSON examples, then inspect the configuration evaluation path in export.js around setAsConfig at line 157 and the triggerExport call shown in the stack trace. The fix is complete when labelFormatter code containing escaped double quotes exports successfully without the reported syntax error.
Written by the indexing model from the issue text.
Description
Export server version: v5.0.0
Highcharts version: 10.2.1
The only difference between these examples is in used quotes in labelFormatter. Only the first one works with export server.
{
"infile": {
"exporting": {
"enabled": true
},
"xAxis": {
"type": "datetime"
},
"legend": {
"labelFormatter": "function () { if (typeof this.chart.series[0] !== 'undefined') { return this.chart.series[0].name; } return 'Somethign else';}"
},
"series": [
{
"name": "Temperature",
"data": [
{
"x": 1743214500000,
"y": 1
}
]
}
]
}
}
{
"infile": {
"exporting": {
"enabled": true
},
"xAxis": {
"type": "datetime"
},
"legend": {
"labelFormatter": "function () { if (typeof this.chart.series[0] !== \"undefined\") { return this.chart.series[0].name; } return 'Somethign else';}"
},
"series": [
{
"name": "Temperature",
"data": [
{
"x": 1743214500000,
"y": 1
}
]
}
]
}
}
Export server logs and received response from export server for the second example:
{
"statusCode": 400,
"message": "[pool] In pool.postWork: For request with ID 935e61e6ae0f4356a2a2264867c6f423 - Error encountered during export: 8.110875ms."
}
2025-04-05 13:29:27 Sat Apr 05 2025 11:29:27 GMT+0000 [error] - [pool] In pool.postWork: For request with ID 935e61e6ae0f4356a2a2264867c6f423 - Error encountered during export: 8.110875ms.
2025-04-05 13:29:27 SyntaxError: Invalid or unexpected token
2025-04-05 13:29:27 new Function (<anonymous>)
2025-04-05 13:29:27 at triggerExport (evaluate at setAsConfig (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:157:15), <anonymous>:63:6)
2025-04-05 13:29:27 at #evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:383:19)
2025-04-05 13:29:27 at async ExecutionContext.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:270:16)
2025-04-05 13:29:27 at async IsolatedWorld.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:96:16)
2025-04-05 13:29:27 at async CdpFrame.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:335:20)
2025-04-05 13:29:27 at async CdpPage.evaluate (file:///home/pptruser/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:799:20)
2025-04-05 13:29:27 at async default (file:///home/pptruser/node_modules/highcharts-export-server/lib/export.js:208:9)
2025-04-05 13:29:27 at async postWork (file:///home/pptruser/node_modules/highcharts-export-server/lib/pool.js:328:20)
2025-04-05 13:29:27 at async doExport (file:///home/pptruser/node_modules/highcharts-export-server/lib/chart.js:438:20)
2025-04-05 13:29:27 at async exportHandler (file:///home/pptruser/node_modules/highcharts-export-server/lib/server/routes/export.js:225:5)
- Dominant language
- JavaScript
- Stars
- 368
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from highcharts/node-export-server
-
Update Puppeteer to version 25.11.0+ to allow ARM64 linux images to run node-export-serverPossibly taken @daniatic claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
highcharts/node-export-server#686 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
highcharts/node-export-server#680 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
highcharts/node-export-server#679 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
highcharts/node-export-server#678 ·
-
Not working on s390xOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
highcharts/node-export-server#676 ·
All issues in highcharts/node-export-server
Similar issues
-
ci-install-db-tools stall-case tests flake: stalled apt-get can be killed before it logs its callOpeneffort:low model:light plan planner:opus-5-5 tests
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla-mobile/firefox-ios#35986 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
component:sight
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agentic-os-org/ANOLISA#6738 · 2 comments ·
Maintainers usually reply within 1 day
-
bug Durable Agents Observability (AI Telemetry) status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
mastra-ai/mastra#26470 · 1 comment ·
Maintainers usually reply within 1 day