Adding convenience function html_encode_and_free_original()