Solving js interpolation for #22. It is as general as possible, to allow
different languages support.