Changed html_entity_decode to htmlentities