Replace safe_concat with concat.
Add missing html_safe where it is necessary.