Diffuse interstellar bands in the H II region M17