When triggering a service from the widget, an MTC node containing a numbered list causes the widget to remain in a loading state indefinitely. DataMapper fails to parse the escaped list markers such as 1\. and returns SyntaxError: Bad escaped character in JSON.
Request: {method: POST, url: /backoffice/hbs/bot_responses_to_messages, params: {}, query: {}, body: {"data":{"authorLastName":"","chatId":"d2895fce-a5d3-4974-8693-d90dbc575f50","botMessages":[{"buttons":[],"text":"See on loendite test! \"null\"\n\n1\\. _cat_\n2\\. cat\n3\\. _cat_\n4\\. **cat**\n5\\. cat\n6\\. _cat_\n7\\. **cat**","recipient_id":"d2895fce-a5d3-4974-8693-d90dbc575f50","result":""}],"authorFirstName":"","created":"2026-07-16T12:27:14.830Z","authorTimestamp":"2026-07-16T12:27:14.830Z","authorId":"chatbot"}}}
err: SyntaxError: Bad escaped character in JSON at position 110
at JSON.parse (<anonymous>)
at /workspace/app/server.js:140:31
at ExpressHandlebars.<anonymous> (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:301:25)
at step (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:49:23)
at Object.next (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:30:53)
at fulfilled (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:21:58)
Response: {statusCode: 200, responseData: "{\"error\":\"There was an error executing /workspace/app/module/backoffice/hbs/bot_responses_to_messages.handlebars\"}"}
Bug description
When triggering a service from the widget, an MTC node containing a numbered list causes the widget to remain in a loading state indefinitely. DataMapper fails to parse the escaped list markers such as
1\.and returnsSyntaxError: Bad escaped character in JSON.Expected behavior
Screenshots:
Test widget result:
Widget result:
DataMapper logs:
Service to test with
nummerdatud_loend_2026_07_16_15_32_56.json