filter out offensive phase/text

Discussion in 'ASP .Net' started by Sam, May 4, 2006.

  1. Sam

    Sam Guest

    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
     
    Sam, May 4, 2006
    #1
    1. Advertising

  2. there are examples around - for instance
    http://www.dotnetjohn.com/articles.aspx?articleid=46

    --
    Regards

    John Timney
    Microsoft MVP

    "Sam" <> wrote in message
    news:...
    > 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
    >
     
    John Timney \( MVP \), May 4, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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!
     
    Swanand Mokashi, May 4, 2006
    #3
  4. Sam

    Sam Guest

    Thanks so lots for the help guys


    "Sam" <> wrote in message
    news:...
    > 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
    >
     
    Sam, May 4, 2006
    #4
  5. Sam

    Mark Rae Guest

    "Swanand Mokashi" <> wrote in message
    news:...

    > 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... :)
     
    Mark Rae, May 4, 2006
    #5
  6. 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" <> wrote in message
    news:...
    > "Swanand Mokashi" <> wrote in message
    > news:...
    >
    >> 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... :)
    >
     
    Swanand Mokashi, May 4, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve

    Out of phase

    Steve, Dec 30, 2003, in forum: VHDL
    Replies:
    1
    Views:
    682
    jussi l
    Dec 30, 2003
  2. Eli Bendersky

    4-phase vs. 2-phase handshaking

    Eli Bendersky, Jan 21, 2008, in forum: VHDL
    Replies:
    11
    Views:
    4,842
  3. zax75
    Replies:
    1
    Views:
    1,127
  4. Josef 'Jupp' Schugt

    '[OFF]' as in 'offensive'???

    Josef 'Jupp' Schugt, Dec 10, 2004, in forum: Ruby
    Replies:
    1
    Views:
    97
    Carlos
    Dec 10, 2004
  5. Jack
    Replies:
    5
    Views:
    260
    Joe Smith
    Nov 12, 2006
Loading...

Share This Page