Questions tagged [profanity]

A sacrilegious word, or more generally an offensive word. In the SO context, a word that may be filtered out of forum postings etc.

Profanity is something that is profane, a synonym of sacrilegious. From the Latin profānus: outside the temple, from pro- + fānum temple

64 questions
0
votes
2 answers

Regex check for words and words with spaces separating letters

So I have an array of profanities that I am checking for in a string. E.g. $string = 'naughty string'; $words = [ 'naughty', 'example', 'words' ]; $pattern = '/('.join($words, '|').')/i'; preg_match_all($pattern, $string,…
Levi Cole
  • 3,561
  • 1
  • 21
  • 36
0
votes
1 answer

How to Censor a SPECIFIC word in Java using Regex

I'd like to know how to censor the word "ass" (or A word) using a Java Regex highly safe. This makes things difficult as the A word can be contained in a lot of other harmless words. For example, "grass." I have setup partially the beginning part…
Agentleader1
  • 41
  • 1
  • 7
0
votes
4 answers

jQuery Profanity filter not updating while typing

I would like to dynamically filter bad words using this profanity filter. The api will change "ass" to "***" in the given example, only if the text was there before page load. I would like it to change recognized bad words as they are typed, to…
Jake
  • 38
  • 1
  • 9
0
votes
3 answers

Ruby on Rails Stop Profanity

I am creating a cinema site using Ruby on Rails and am adding in a review system. I want to stop users from swearing in their reviews and have tried the following gems to do so: validates_decency_of NoNo Fu-Fu The only thing that has come close…
user4227507
0
votes
2 answers

Go over each word in a filter

I feel like i'm coming up against a brick wall. I've made a profanity filter, however this currently works when one bad word is entered, when more words (bad or otherwise) are entered it no longer filters and submits fine. I'd like it to not submit…
Corcor
  • 61
  • 4
  • 12
0
votes
1 answer

Removing spaces between letters of words

I am putting together a basic profanity filter in java to detect profanity on user input. I am not trying to handle all possible scenarios which I know that is probably impossible to solve using a computer only. However, I do want to handle few…
okrunner
  • 3,083
  • 29
  • 22
0
votes
4 answers

Profanity filter import

I am looking to write a basic profanity filter in a Rails based application. This will use a simply search and replace mechanism whenever the appropriate attribute gets submitted by a user. My question is, for those who have written these before, is…
randombits
  • 47,058
  • 76
  • 251
  • 433
0
votes
3 answers

Javascript profanity match NOT replace

I am building a very basic profanity filter that I only want to apply on some fields on my application (fullName, userDescription) on the serverside. Does anyone have experience with a profanity filter in production? I only want it to: 'ass hello'…
onlineracoon
  • 2,932
  • 5
  • 47
  • 66
0
votes
2 answers

How to add a profanity filter in C#

I have a list of comments that gets formed. The client asked us to use a profanity filter to check the comments before they get published. I have a ProfanityFilter.cs class. The only thing is I am not sure how to integrate the the two. Simply…
Peter
  • 427
  • 4
  • 9
  • 37
-1
votes
1 answer

Replacing only exact matches in Regex

I have a javascript function that replaces strings that match against a profanity library with symbols. eg. damn is transformed into @#$%&! However, this replace is non-discriminating, and will transform partial matches as well. eg. classic is…
R A
  • 3
  • 1
-1
votes
3 answers

I want to turn an array $badwords into a file to be called

I have a form that sends an email. I have a list of words to ban, and they are manually entered in an array. Each word in the array gets a point which eventually can reject a mail send. I want to put the words into a file instead to call up…
HWL1223
  • 11
  • 2
-1
votes
1 answer

How to implement decent "bad word filter"?

How can I create the good bad word chat filter? For example, let users not type Poop and send them warning. However it should also filter pooopppp , P00p, Po0p, P0o0o0op, (or whatever trick they try to use) etc.
Arjay
  • 45
  • 2
-1
votes
1 answer

Greasemonkey profanity filter script to work on Youtube comments

I do not know what I am talking about here I go. On some pages it filters them and others like Youtube comments don't work. What code needs to change in order for it to work in these sites? // ==UserScript== // @name profanity_filter //…
-1
votes
2 answers

So I am working on a code that I am stuck on with

I'm stuck on an assigment! Please help! the assignments asks We would like to give our users the option of filtering out profanity . Suppose that we consider the words cat, dog, and llama to be profane. Write a program that reads a string from the…
-1
votes
2 answers

Better way to code this - Checking comment for banned word

Is there a better, faster way of doing the below? This is a method from a class to check if a comment has a banned word in it, if so the comment needs to be manually approved. I don't really want to change the way my models/database works so…
user1954882
  • 330
  • 1
  • 3
  • 8