Propagation of nonclassical light through an absorbing and dispersive slab