473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

filter out offensive phase/text

Sam
Hi all,

I have feedback page which allows users to submit input text. Is there a way
to filter out offensive language (some kind of validation check), say I have
a list of words in a table that I want to check against. Any help would be
greatly appreciated.

Regards,

Sam
May 4 '06 #1
5 1276
there are examples around - for instance
http://www.dotnetjohn.com/articles.aspx?articleid=46

--
Regards

John Timney
Microsoft MVP

"Sam" <as****@yahoo.com> wrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hi all,

I have feedback page which allows users to submit input text. Is there a
way to filter out offensive language (some kind of validation check), say
I have a list of words in a table that I want to check against. Any help
would be greatly appreciated.

Regards,

Sam

May 4 '06 #2
You can have 2 columns in a sql table - offensive word and what you want it
replaced by eg would be ass (WordToReplace) and a** (ReplaceBy)

then you can get that data in your code and loop through the rows and
replace the offensive word (if found in the input text) and replace it with
what you want it replaced with.

So user enters "you are an ass" then

foreach (DataRow badWord in badWordsDataTable)//get the data loop going
{
//say userInput is the string that contains the user input
userInput = userInput.Replace(badWord["WordToReplace"],
badWord["ReplaceBy"]);
}

HTH
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Sam" <as****@yahoo.com> wrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hi all,

I have feedback page which allows users to submit input text. Is there a
way to filter out offensive language (some kind of validation check), say
I have a list of words in a table that I want to check against. Any help
would be greatly appreciated.

Regards,

Sam


--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 898 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
May 4 '06 #3
Sam
Thanks so lots for the help guys
"Sam" <as****@yahoo.com> wrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hi all,

I have feedback page which allows users to submit input text. Is there a
way to filter out offensive language (some kind of validation check), say
I have a list of words in a table that I want to check against. Any help
would be greatly appreciated.

Regards,

Sam

May 4 '06 #4
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uF**************@TK2MSFTNGP03.phx.gbl...
You can have 2 columns in a sql table - offensive word and what you want
it replaced by eg would be ass (WordToReplace) and a** (ReplaceBy)


Does anyone remember many years ago when CompuServe implemented a similar
function on their online registration process...?

For a while, no-one in the town of Scunthorpe in the UK was able to
register... :-)
May 4 '06 #5
That is why you replace the offensive word by *** instead of not allowing
the user to post the information :)

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> wrote in message
news:uT**************@TK2MSFTNGP05.phx.gbl...
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:uF**************@TK2MSFTNGP03.phx.gbl...
You can have 2 columns in a sql table - offensive word and what you want
it replaced by eg would be ass (WordToReplace) and a** (ReplaceBy)


Does anyone remember many years ago when CompuServe implemented a similar
function on their online registration process...?

For a while, no-one in the town of Scunthorpe in the UK was able to
register... :-)

May 4 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rob | last post by:
In Python 2.3, this code still prints a warning (when run as a script, not from the interpreter). How do I get rid of the warning? I'd like to do it without passing command line args to python. ...
3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
3
by: Vern | last post by:
The following code retrieves data into a dataset, and then creates a dataview with a filter. This dataview is then attached to a combobox. When the effective date changes, I would like to see the...
29
by: Stefan Slapeta | last post by:
There have been many announciations that VC 8.0 will finally support two phase template lookup; now, after I installing VC 2005 Express I had to realize that it still doesn't! What has happend...
2
by: Ravi Sankar | last post by:
Hi, I have been working in quite a big project that is split into two phases. The phase I part of ASP.Net web application is live and under maintenace now. We have started design of phase II....
0
by: RyanG | last post by:
when the value that determines the filter is databound?? I am trying to make a DropDownList for a set of data that I use a lot throughout my project. So I extended the DropDownList to retrieve...
0
by: Ufit | last post by:
when I apply any style to <html tag f.ex. style="filter:progid:DXImageTransform.Microsoft.Wave (Add='false', LightStrength=0, Phase=0, Strength=0, Freq=3)" and theres dropdown list on the page it...
5
by: Ron S | last post by:
After days of searching I finally an example that would work with my application, the only problem is after entering all of the code it is not working. Would someone be kind enough to take a look at...
13
by: paul.joseph.davis | last post by:
Hi, I've just had my first encounter with two-phase lookup and I'm scratching my head a bit. The idea behind two phase look up is pretty easy to understand, but I have a case that fails to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.