removing html from textarea

Discussion in 'HTML' started by diablo, Jun 28, 2005.

  1. diablo

    diablo Guest

    hi

    i have seen several examples (blogs in particular)

    http://www.lastkissed.com/?p=7#comments

    where placing html into a textarea seems to be stripped out on the other
    side. and yet retains some...

    for example the above - i placed a </table> into the comment and submitted -
    the <blockquote> came out as a block quote but the </table> seems to have
    dissappeared.

    is there a way i can do a similar box - ie so that if someone puts html into
    it - it is stripped out?

    thanks for help

    Diablo
     
    diablo, Jun 28, 2005
    #1
    1. Advertising

  2. diablo

    Vladdy Guest

    diablo wrote:
    > hi
    >
    > i have seen several examples (blogs in particular)
    >
    > http://www.lastkissed.com/?p=7#comments
    >
    > where placing html into a textarea seems to be stripped out on the other
    > side. and yet retains some...
    >
    > for example the above - i placed a </table> into the comment and submitted -
    > the <blockquote> came out as a block quote but the </table> seems to have
    > dissappeared.
    >
    > is there a way i can do a similar box - ie so that if someone puts html into
    > it - it is stripped out?
    >
    > thanks for help
    >
    > Diablo
    >
    >

    When done properly, the form data filtering is performed server side
    using available scripting language.
    PHP has some HTML filtering functions built-in.
    You can easily write a function utilizing the regular expressions to do
    the job.


    --
    Vladdy
    http://www.klproductions.com
     
    Vladdy, Jun 29, 2005
    #2
    1. Advertising

  3. diablo

    diablo Guest

    hi

    im still a lowly ASP developer. Anyone know how i can get hold of some
    functions for ASP?

    thanks


    "Vladdy" <> wrote in message
    news:FOmwe.13721$Q27.717@trndny02...
    > diablo wrote:
    > > hi
    > >
    > > i have seen several examples (blogs in particular)
    > >
    > > http://www.lastkissed.com/?p=7#comments
    > >
    > > where placing html into a textarea seems to be stripped out on the other
    > > side. and yet retains some...
    > >
    > > for example the above - i placed a </table> into the comment and

    submitted -
    > > the <blockquote> came out as a block quote but the </table> seems to

    have
    > > dissappeared.
    > >
    > > is there a way i can do a similar box - ie so that if someone puts html

    into
    > > it - it is stripped out?
    > >
    > > thanks for help
    > >
    > > Diablo
    > >
    > >

    > When done properly, the form data filtering is performed server side
    > using available scripting language.
    > PHP has some HTML filtering functions built-in.
    > You can easily write a function utilizing the regular expressions to do
    > the job.
    >
    >
    > --
    > Vladdy
    > http://www.klproductions.com
     
    diablo, Jun 29, 2005
    #3
  4. diablo

    Mark Parnell Guest

    Mark Parnell, Jun 29, 2005
    #4
  5. diablo

    diablo Guest

    Hi

    I have looked and looked - the consenus is to use reg expressions - here is
    a good example-

    http://www.4guysfromrolla.com/webtech/042501-1.shtml

    but i cannot find anything that will aloow me to keep a certain set of tags
    such as <b> and <blockquote> and <a href..>

    is there any reg exp guru that could modify this

    objRegExp.Pattern = "<(.|\n)+?>"

    to be able to ignore certain tags?

    thanks

    Diablo


    "Mark Parnell" <> wrote in message
    news:...
    > Previously in alt.html, diablo <> said:
    >
    > > im still a lowly ASP developer. Anyone know how i can get hold of some
    > > functions for ASP?

    >
    > Google is your friend:
    > http://www.google.com.au/search?q=asp strip html
    >
    > BTW: Please don't post upside down.
    > http://www.allmyfaqs.com/faq.pl?How_to_post
    > http://en.wikipedia.org/wiki/Top-posting
    >
    > This will help:
    > http://home.in.tum.de/~jain/software/oe-quotefix/
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
    > alt.html FAQ :: http://html-faq.com/
     
    diablo, Jun 29, 2005
    #5
  6. diablo

    Adrienne Guest

    Gazing into my crystal ball I observed "diablo" <>
    writing in news:Ytswe.11778$:

    > Hi
    >
    > I have looked and looked - the consenus is to use reg expressions -
    > here is a good example-
    >
    > http://www.4guysfromrolla.com/webtech/042501-1.shtml
    >
    > but i cannot find anything that will aloow me to keep a certain set of
    > tags such as <b> and <blockquote> and <a href..>
    >
    > is there any reg exp guru that could modify this
    >
    > objRegExp.Pattern = "<(.|\n)+?>"
    >
    > to be able to ignore certain tags?
    >
    > thanks
    >
    > Diablo
    >


    This question is better answered in
    microsoft.public.inetserver.asp.general. Followups set.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Jul 1, 2005
    #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. Daniel =?iso-8859-1?Q?Sj=F6blom?=

    Re: printing textarea & removing \n

    Daniel =?iso-8859-1?Q?Sj=F6blom?=, Jun 27, 2003, in forum: Java
    Replies:
    2
    Views:
    2,075
    Kyle Walz
    Jun 27, 2003
  2. Chris  Chiasson
    Replies:
    6
    Views:
    627
    Richard Tobin
    Nov 14, 2006
  3. Augustus
    Replies:
    1
    Views:
    367
    Ken Schaefer
    Sep 10, 2003
  4. Textarea Inside of a textarea

    , Feb 4, 2006, in forum: ASP General
    Replies:
    6
    Views:
    341
    Anthony Jones
    Feb 5, 2006
  5. Replies:
    1
    Views:
    324
    Bart Van der Donck
    Jul 4, 2007
Loading...

Share This Page