removing html from textarea

D

diablo

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
 
V

Vladdy

diablo said:
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.
 
D

diablo

hi

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

thanks
 
D

diablo

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
 
A

Adrienne

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top