fixed htmlentities parameters to comply with PhP 5.3.x