i searched on PHP function list, but there is nothing to reverse the htmlspecialchars or htmlentities or the nl2br().
your solution is the best or the only choice i guess.
but, if you are saving the data to the db, and then retrieving it back to display on webpage, then it will be wiser not to save the text after the conversions. but only to run the conversions when the data is been printed on html page.