replace htmlentities() with htmlentities_utf8()
drwxr-xr-x - docs