Lipschitz continuity for energy integrals with variable exponents