fixed htmlentities parameters to comply with PhP 5.3.x
Merge branch 'upstream/master'