The move is sure to face legal challenges for allegedly violating the First Amendment.