US confectioner Hershey Foods has said its quarterly earnings rose as higher chocolate bar prices and a better product mix lifted profit margins.