Improve test_strip_html dictionary check