change raw to html_safe