nl_tokens: Replaces all occurrences of the specified variable in the provided template with its value .
pl_tokens: function replaceVariable ( template , name , value ) { let key = ` ${ <mask> } ` ; let reg = new RegExp ( helper . escapeRegExp ( key ) , 'g' ) ; let encodedReg = new RegExp ( helper . escapeRegExp ( ` ${ name } ` ) , 'g' ) ; let encodedValue = JSON . stringify ( value ) . replace ( / <\/script / gi , '<\\/script' ) ; return template . replace ( reg , value ) . replace ( encodedReg , encodedValue ) ; }