If a data field includes a \ and is added to jsonData the string can not parsed correct. This leads to an error and throws a message in Browser.
To Reproduce
Create a JSONConfig with a text input and sendTo where the data from text input is included in jsonData string.
Enter a \ in text input and hit the sendTo button. Then look into the browser console.
Expected behavior
The string has to be checked for regex characters and has to escape findings.
Screenshots & Logfiles
Cannot parse json data: {"subject": "Test des email adapters", "to": "christoph@all-smart.net", "from": "ioBroker", "text": "This is a test email from ioBroker!", "service": "", "options": { "host": "mail.all-smart.net", "port": "587", "secure": "false", "requireTLS": "true", "auth": {"user": "iobroker@all-smart.net", "pass": "\"} } }
No existing issues.
Describe the bug
If a data field includes a \ and is added to jsonData the string can not parsed correct. This leads to an error and throws a message in Browser.
To Reproduce
Create a JSONConfig with a text input and sendTo where the data from text input is included in jsonData string. Enter a \ in text input and hit the sendTo button. Then look into the browser console.
Expected behavior
The string has to be checked for regex characters and has to escape findings.
Screenshots & Logfiles
Cannot parse json data: {"subject": "Test des email adapters", "to": "christoph@all-smart.net", "from": "ioBroker", "text": "This is a test email from ioBroker!", "service": "", "options": { "host": "mail.all-smart.net", "port": "587", "secure": "false", "requireTLS": "true", "auth": {"user": "iobroker@all-smart.net", "pass": "\"} } }
Adapter version
7.2.6
js-controller version
7.0.1
Node version
v22.9.0
Operating system
Ubuntu
Additional context
No response