Remove unnecessary use of .html_safe from templates, and render safe str...

...ings from render_* helpers  as appropriate. Fixes #660