fix history template, print_unescaped() needs to include closing tags

fix for #3083