safe merge

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

safe merge

Post by monte » Wed Dec 11, 2013 10:45 am

Hi

Merge is quite a neat function until you want to let others create templates and then you need to worry about them putting something nefarious in there. I'm wondering if others see the utility in having an option on the merge function to only allow merging in variable values via [[ ]] or <? return var ?> but no evaluation of the expressions. It could be an extra parameter or separate function.

BTW I understand that it might just be simpler to script up a safe merge function using the replace command but that would require multiple iterations of the same templates so performance could be significantly poorer.

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Locked

Return to “Engine Contributors”