Fix missing {, use safestring for li wrapping and return a template now.