When repopulating a form with user-submitted POST data (say a required field wasn't filled in), I usually use a combination of stripslashes() and htmlentities() to escape the data.
stripslashes(htmlentities($_POST['something'], ENT_QUOTES, 'UTF-8'))
Is there a more efficient/preferred way of doing this?