MPs back a draft law that seeks harsh punishments against those who are “inappropriately” dressed.