Welcome, Guest
Username: Password: Remember me

TOPIC: Profanity filter

Profanity filter 2 years 10 months ago #69709

  • Nem3s1S
  • Nem3s1S's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
I would like to setup a profanity filter for short/long free text answers, so if a user types any profanity, from a set/defined list, in their response and click next they will return to the question and told they cannot use profanity in their response. Can anyone point me in the right direction on how this might be achieved?
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #69715

  • jelo
  • jelo's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 470
  • Thank you received: 52
  • Karma: 16
Never saw this in a survey app, since you want to capture the voice of the proband. Never would use that, since it means influencing the proband. If the system is telling me "don't use profanity", I call it a clbuttic scenario ;-)

Technically I don't see any chance to implement this in a useful and reliable way.
A Javascript, which is used to parse the textfield where the proband is typing and display a info box. Ideas can be found here:
www.codingforums.com/showthread.php?t=192048
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #69739

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
The only solution would be some Javascript which is run during text input and uses a predefined checking algorithm. You can disable the next button until the check says that it is a valid input.
But it will be hard to define a useful checking algorithm.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #69917

  • Nem3s1S
  • Nem3s1S's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Thanks for the feedback. I will look into JavaScript and will post back if i have any success.
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #70038

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
Nem3s1S wrote:
Thanks for the feedback. I will look into JavaScript and will post back if i have any success.
You're welcome.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #70103

  • Nem3s1S
  • Nem3s1S's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
So two fantastic work associates and myself have worked on a Regular expression that is working for Short, Long, Huge free text answers. It works for at least one word at a time, but hey, its a start right! Here is what we have thus far:

/^(?i)((?!\bENTERPROFANITYHERE\b).)*$(?-i)/

Obviously replace "ENTERPROFANITYHERE" with your bad word!

The \b will allow passing of words such as "assassination" & "hello" if you enter ass or hell as your profanity word. This also works if you are trying to omit other words, names etc. from answers.

Feedback\Criticism is always welcome!
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #70110

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: Nem3s1S

Re: Profanity filter 2 years 10 months ago #70375

  • Nem3s1S
  • Nem3s1S's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Added!
The administrator has disabled public write access.

Re: Profanity filter 2 years 10 months ago #70415

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
Great, thanks for your help.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.107 seconds
Donation Image