A judge ruled lawmakers sought a ban based on "content and viewpoint."