(1)(a) The confidential and exempt status of criminal intelligence information or criminal investigative information made confidential and exempt pursuant to s. 119.071(2)(h) must be maintained in court records pursuant to s. 119.0714(1)(h) and in court proceedings, including testimony from witnesses. (b) If a petition for access to such confidential and exempt records is filed with the trial court having jurisdiction over the alleged offense, the confidential and exempt status of such information shall be maintained by the court if the state or the victim demonstrates that:
1. The identity of the victim is not already known in the community;
2. The victim has not voluntarily called public attention to the offense;
3. The identity of the victim has not otherwise become a reasonable subject of public concern;
4. The disclosure of the victim’s identity would be offensive to a reasonable person; and
5. The disclosure of the victim’s identity would:
a. Endanger the victim because the assailant has not been apprehended and is not otherwise known to the victim;
b. Endanger the victim because of the likelihood of retaliation, harassment, or intimidation;
c. Cause severe emotional or mental harm to the victim;
d. Make the victim unwilling to testify as a witness; or
e. Be inappropriate for other good cause shown.
(2) A defendant charged with a crime described in chapter 794 or chapter 800, or with child abuse, aggravated child abuse, or sexual performance by a child as described in chapter 827, may apply to the trial court for an order of disclosure of information in court records held confidential and exempt pursuant to s. 119.0714(1)(h) or maintained as confidential and exempt pursuant to court order under this section. Such identifying information concerning the victim may be released to the defendant or his or her attorney in order to prepare the defense. The confidential and exempt status of this information may not be construed to prevent the disclosure of the victim’s identity to the defendant; however, the defendant may not disclose the victim’s identity to any person other than the defendant’s attorney or any other person directly involved in the preparation of the defense. A willful and knowing disclosure of the identity of the victim to any other person by the defendant constitutes contempt.
(3) The state may use a pseudonym instead of the victim’s name to designate the victim of a crime described in chapter 794 or chapter 800, or of child abuse, aggravated child abuse, or sexual performance by a child as described in chapter 827, or any crime involving the production, possession, or promotion of child pornography as described in chapter 847, in all court records and records of court proceedings, both civil and criminal.
(4) The protection of this section may be waived by the victim of the alleged offense in a writing filed with the court, in which the victim consents to the use or release of identifying information during court proceedings and in the records of court proceedings.
(5) This section does not prohibit the publication or broadcast of the substance of trial testimony in a prosecution for an offense described in chapter 794 or chapter 800, or a crime of child abuse, aggravated child abuse, or sexual performance by a child, as described in chapter 827, but the publication or broadcast may not include an identifying photograph, an identifiable voice, or the name or address of the victim, unless the victim has consented in writing to the publication and filed such consent with the court or unless the court has declared such records not confidential and exempt as provided for in subsection (1).
(6) A willful and knowing violation of this section or a willful and knowing failure to obey any court order issued under this section constitutes contempt.