§ 22. Privilege of officers and prisoner from arrest while passing through another county. A prisoner conveyed to jail through another county by a sheriff or other officer pursuant to law, or the officer having him in custody, is not liable to arrest in any civil action or special proceeding, while passing through another county.