Moral norms are a loose concept which is embroiled in controversy in religious societies. Even nowadays, a point of view that contradicts the dominant understanding of public decency could get you into jail in some countries - and even celebrities are not immune to this.

Rania Youssef, an Egyptian actress and model, is facing a trial on charges of public obscenity for what critics say is her revealing red carpet looks.

Youssef, 44, donned a revealing dress at the closing ceremony of the Cairo Film Festival on Thursday. She was photographed posing on the red carpet in a black leotard with a sheer overdress that exposed her legs.

Two Egyptian lawyers, Amro Abdelsalam and Samir Sabri, filed court complaints accusing the actress of "inciting debauchery." Samir Sabri said that Youssef's attire "did not meet societal values, traditions and morals and therefore undermined the reputation of the festival and the reputation of Egyptian women in particular."

© REUTERS / Mohamed Soliman Egyptian actor Rania Youssef attends the closing ceremony of CIFF in Cairo

According to AFP, Youssef will go to court on January 12 to face the charges. She could be locked up in prison for up to five years if found guilty.

The case sparked public outrage on social media, with some claiming that Egyptian laws are ourdated.

If this is not a joke stay well clear of Egypt — John Skoulding (@johnskoulding) 1 декабря 2018 г.

How backwards. 5 years for a dress, 8 years for complaining online about a vacation there.. who would want to live there? — Duck Duck Shark (@DuckDuckShark1) 1 декабря 2018 г.

wtf. hard to believe we live in the 21st century and some countries laws are more 12th century. — Nigel Baker (@NigelBa98232658) 1 декабря 2018 г.

Awful. Persecuted for having human skin. It's ridiculous. — Meg Caprino (@calicobayfarm) 1 декабря 2018 г.

The actress took her apologies in a Facebook post to "every Egyptian family angered" by her dress and said that she adhered to the "values and ethics" cherished in the Egyptian society. She also said that she would not have chosen the dress if she had known that it would spark public outrage.

Egypt is a country where Muslims constitute an overwhelming majority (nearly 90% of the population against 10 percent of Christians). The Egyptian legal system is built upon various European codes and the Islamic law (Sharia). Article 2 of Egypt's 2014 constitution declares that Islam is the religion of the state and the principles of Sharia are the main source of legislation.

© REUTERS / Mohamed Soliman Egyptian actor Rania Youssef attends the closing ceremony of CIFF in Cairo

Youssef's case is not the first time an Egyptian celebrity is facing judicial wrath for violating public decency. Pop singer Leila Amer was handed a two-year jail term in March for starring in a music video that featured "suggestive" dancing and was called a "moral disaster" by the lawyer who filed the complaint.

Moreover, in February, singer Sherine was sentenced to six months in jail on charges of "offending Egypt." Sherine was taken to court for a music clip in which she warned a fan against drinking from the Nile River because it could give them parasites.