The 35-year-old had confessed during his interrogation to attacking the woman but was released by the court after it decided that no crime had been committed, the Dogan news agency reported.
The man said he behaved the way he did because he was suffering from a mental illness, it added.
The attacker, a security worker, had previously been diagnosed as suffering from "manic depression", the agency said.
Shouting "Those wearing shorts must die!", the man attacked the woman, a nurse, kicking her in the face, reports said.
He later told police he had been angered by her clothing.
"The shorts she was wearing were not appropriate. That's why I was angry and behaved so," he was quoted as saying by Dogan.
Many feminists in Turkey have expressed growing concern over the extent of violence against women, with hundreds killed every year, often by their husbands.
Disclaimer: No Business Standard Journalist was involved in creation of this content
