Since the Texas Legislature made online solicitation of a minor a crime in 2005, it's been used to lock up any number of gymnastics coaches, teachers, as well as plenty of non-educators caught digitally cruising for sex with underage kids. Today, the Texas Court of Criminal Appeals ruled unanimously that the law is unconstitutionally vague.

The justices don't have an issue with the idea behind the law, which is that adults should be punished for attempting to have sex with children, regardless of whether any sexual contact occurs. Their problem is with the wording of the statute. Here's the offending passage, which describes a third-degree felony:

A per­son who is 17 years of age or older com­mits an offense if, with the intent to arouse or grat­ify the sex­ual desire of any per­son, the per­son, over the Inter­net or by elec­tronic mail or a com­mer­cial online ser­vice, inten­tion­ally com­mu­ni­cates in a sex­u­ally explicit man­ner with an indi­vid­ual who rep­re­sents him­self or her­self to be younger than 17 years of age.

According to the court's opinion, available here, that provision is "overbroad because it prohibits a wide array of constitutionally protected speech and is not narrowly drawn to achieve only the legitimate objective of protecting children from sexual abuse."

You want examples? The justices are full of them. Not only does the law ban a "whole cornucopia of 'titillating talk' or 'dirty talk.'"

But it also includes sexually explicit literature such as "Lolita," "50 Shades of Grey," "Lady Chatterly's Lover," and Shakespeare's "Troilus and Cressida." It includes sexually explicit television shows, movies, and performances such as "The Tudors," "Rome," "Eyes Wide Shut," "Basic Instinct," Janet Jackson's "Wardrobe Malfunction" during the 2004 Super Bowl, and Miley Cyrus's "twerking" during the 2013 MTV Video Music Awards. It includes sexually explicit art such as "The Rape of the Sabine Women," "Venus De Milo," "The Naked Maja," or Japanese Shunga. Communications and materials that, in some manner, "relate to" sexual conduct comprise much of the art, literature, and entertainment of the world from the time of the Greek myths extolling Zeus's sexual prowess, through the ribald plays of the Renaissance, to today's Hollywood movies and cable TV shows.

To be clear, someone should be prosecuted for Miley Cyrus' twerking. It just shouldn't be some dude sharing it on Facebook.

Again, the court doesn't have a problem with the general thrust of the law. Indeed, the justices write the state has a "compelling need" to prosecute "sexual predators who attempt to solicit a minor, or a police officer posing as a minor, for unlawful activity when the individual does not show up for the meeting." It's just that, as currently written, the law bans adults from engaging in "titillating talk" with a minor even if they don't plan to have sex with them. That's protected by the First Amendment.