hi all, i am updating the url link in database through ui-text input node and postgresql, displaying ui-table.
example: http://localhost:3000/d/oJ65LywGk/dashboard-oee-1?orgId=1 this is the url, after updating, in the ui-table and database, it shows like below:
Where it is not accepting special characters.
SQL Query: INSERT INTO grafana_list (machine_name,machine_no,link,note) VALUES ('{{msg.payload.machine_name}}','{{msg.payload.machine_no}}','{{msg.payload.link}}','{{msg.payload.note}}');
http://localhost:3000/d/oJ65LywGk/dashboard-oee-1?orgId=1
requesting to support
E1cid
20 April 2022 15:26
2
use triple braces
{{{msg.payload.machine_name}}}
Then it will not convert html/special characters
1 Like
Thanks @E1cid , it is updating correctly., why three curly brackets are using?
E1cid
21 April 2022 06:11
4
If you read the help info for the node in the sidebar it explains that 3 braces tell the node not to replace html/special characters. Why, because that's how the node author configured it, probably so you can display the text on a web page, where the characters would cause issues.
1 Like
It’s a “feature” of the mustache syntax library being used. See the mustache docs for details GitHub - janl/mustache.js: Minimal templating with {{mustaches}} in JavaScript
system
Closed
5 May 2022 14:06
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.