Moved htmlentities_wrapper() so that the declarations are sorted.