Handle html_safe in attributes