Fixed 'blank page' when loading templates due to jQuery interpreting template's text as Document