Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Sachin Mane
Profanity check for wall posts.
26 de junio de 2012 20:47
Respuesta

Sachin Mane

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 9 de abril de 2012

Mensajes recientes

Hello,

Is there any way we can implement profanity check for wall posts to remove bad words with something like %$$T^#?

Is there any open source library available which can be used?

Regards,
Sachin
Sandeep Nair
RE: Profanity check for wall posts.
26 de junio de 2012 22:06
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

You can achieve the same using Sanitizers in Liferay
Sachin Mane
RE: Profanity check for wall posts.
26 de junio de 2012 22:47
Respuesta

Sachin Mane

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 9 de abril de 2012

Mensajes recientes

Thanks Sandeep.
I looked at the Sanitizers but there is no usesable OOTB SanitizerImpl in liferay. It just provides a hook where we have to write our own implementation.
The DefaultSanitizerImpl returns the original string back without any modifications.

Is there any ready made implementation available?

Regards,
Sachin.
Sachin Mane
RE: Profanity check for wall posts.
26 de junio de 2012 22:50
Respuesta

Sachin Mane

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 9 de abril de 2012

Mensajes recientes

Okay. I think i will have to deploy antisamy hook and check if provides any Sanitizer impl.
Sandeep Nair
RE: Profanity check for wall posts.
27 de junio de 2012 0:50
Respuesta

Sandeep Nair

Ranking: Liferay Legend

Mensajes: 1721

Fecha de incorporación: 5 de noviembre de 2008

Mensajes recientes

Antisamy hook can be used as reference. You can also create your own santizer implementation class, by just setting the property in the hook
Sachin Mane
RE: Profanity check for wall posts.
27 de junio de 2012 2:17
Respuesta

Sachin Mane

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 9 de abril de 2012

Mensajes recientes

I tried AntiSamy hook. but i think it is only meant to remove malicious code from the content and not for removing bad words.
If a custom sanitizer is to be implemented, i will have to refer to some repository of bad words. It also needs to be able to filter the content based on the context in which the word is used.

Something similar is required to filter out offensive images to be uploaded.