added html entities support