Fix encoding and decode html entities.