BT San 63b(29) :כל ליצנותא אסירא בר מליצנותא דע׳ז דשריא : all irreverence is forbidden except for irreverence towards idolatry which is permitted See the entire entry for bar min prep. except for; outside of