solving error with .html_safe