re-factor: using html.entities.