html_entity_decode doesnt replace &nbsp; as it should be. its better to rely on str_replace() then