I use this code, it should also disable javascript:
$data_string = HtmlSpecialChars($data_string);
$data_string = ereg_replace( "(<😉(/{0,1})(b|big|i|li|ol|p|small|ul)(>😉", "<\2\3>", $data_string);
I run this code on the data before it goes into the database.
The first line renders the html useless, the tags will displayed, however. The second line allows certain html tags to be used ( <b>, <big>, <i>, <li>, <ol>, <p>, <small>, and <ul> as well as their closing tags)
See if that helps!