HySoaKa / node-red-contrib-postgrestor

Yet another Node-RED node to query PostgreSQL
GNU Affero General Public License v3.0
10 stars 17 forks source link

Insert json string escape quotes #10

Open alanrigele opened 5 years ago

alanrigele commented 5 years ago

When inserting the JSON string into a postgres table, the " chars are converted to @quot;

shanness commented 5 years ago

Any solution or workaround to this, it's breaking my inserts :(

shanness commented 5 years ago

Tracked this down to mustache HTML escaping. The simple fix (which should really go into the README) is to use {{{msg.payload.json}}}

From this page https://mustache.github.io/mustache.5.html

All variables are HTML escaped by default. 
If you want to return unescaped HTML, use the triple mustache: {{{name}}}.
codinggirl commented 4 years ago

Tracked this down to mustache HTML escaping. The simple fix (which should really go into the README) is to use {{{msg.payload.json}}}

From this page https://mustache.github.io/mustache.5.html

All variables are HTML escaped by default. 
If you want to return unescaped HTML, use the triple mustache: {{{name}}}.

Thank you saved my day.