One fix that developers could do, and which would address 93.6% of the problem is to move the template editing out-of-normal-editing-space. Disentangle the template code, from the editable text. W