Document htmlEntities JS funtion