Solved

Remove HTML tags from Textbox w/o turning off ValidateRequest

Posted on 2006-10-19
2
331 Views
Last Modified: 2008-02-01
I know when a user tries to add HTML like tags in a text box, an error will occur if ValidateRequest is turned off....however there are some security implications when this is turned off....I know how to remove HTML tags using RegEx, but I don't know how to remove the HTML before the validaterequest throws an error.

Any Ideas? I want to just remove the HTML so the text being posted will be valid. Thanks!
0
Comment
Question by:Skytide
2 Comments
 
LVL 18

Accepted Solution

by:
tusharashah earned 500 total points
ID: 17768011
You can do this using JavaScript at client side before data is submitted to server, here are couple of links on this topic:
  - http://www.codeproject.com/aspnet/SubmissionHijack.asp?df=100&forumid=86607&exp=0&select=921475
  - http://weblogs.asp.net/mhawley/archive/2004/03/15/89762.aspx
0
 

Author Comment

by:Skytide
ID: 17768688
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question