Fixed has_html detection