On 16/12/2015 15:00, Brahmanathaswami wrote:
Sorry but this did not work:

replace "'" with "\'" in tBody
put merge("echo '[[tBody]]' | ") into tCmd
put format ("mail -s \"Visitor Care Notice\" -r \"no-re...@hindu.org\" "
& tAddresses) after tCmd
get shell(tCmd)

tBody = Peter is visiting Kauai from Scotland. He says "It's a great
day...Finally I get a break from coding and get to leave this island in
the northern hinterland and go to another one in the Pacific Blue."

email arrives with quotes stripped out.

Peter is visiting Kauai from Scotland. He says It's a great
day...Finally I get a break from coding and get to leave this island in
the northern hinterland and go to another one in the Pacific Blue.

Back the first question: how do we replace double quotes in a field or
variable?

By the way, for security reasons you *must* ensure that the contents of tBody and tAddresses are fully stripped of any shell metacharacters like ` or $. One of the good things about using single quotes '...' is that the shell does no expansion at all in a single-quoted string.

If you don't, anybody who can affect the contents of tAddresses or tBody can possibly execute arbitrary code on your server.

                                         Peter

--
Dr Peter Brett <peter.br...@livecode.com>
LiveCode Open Source Team

LiveCode on reddit: https://reddit.com/r/livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to