Fixes: #2062 the template don't escape the html inside itself
Fixes: #2153
Fixes: #1708 Fixed lots of perl errors