Wiktionary
spirit of the law
n. The interpretation of the law towards the end of providing justice, even if this interpretation does not fall within the law as written.