xml unescape the template before compiling