Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Block HTML and Javascript


Block HTML and Javascript

Reply
  #1 (permalink)  
Old 03-08-05, 04:25 PM
ObliviatorKK ObliviatorKK is offline
Newbie Coder
 
Join Date: Nov 2004
Location: New Britain, Connecticut
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Block HTML and Javascript

I need a code that will block html and javascript. I have it so my users can go to their Control Panel, and in a text box, insert any text they wish. I want it so that it will block any html, and javascript they put in there. Not the textbox, but the page where it shows the info. I don't know if there are tags that will let me do that, becuase I want it to only work in the specific area where it shows the info the user put. Thank you.
Reply With Quote
  #2 (permalink)  
Old 03-08-05, 07:53 PM
koncept
Guest
 
Posts: n/a
in the "on submit" or save replace certain characters with non code characters for example replace teh < with &gt (somthing like that)
Reply With Quote
  #3 (permalink)  
Old 03-09-05, 10:52 AM
kjmatthews kjmatthews is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: Boston, MA
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
This would be most easily done with a server-side language like PHP, which has a strip_tags() function specifically designed to strip user-defined HTML tags. See the documentation.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 10:25 AM
HTML DOM, JavaScript, ASP, where to begin? fushichouryuuko ASP 1 01-01-05 04:18 PM
please help me turn the html code to javascript kicon JavaScript 5 12-16-04 08:54 AM
Can Javascript go in an html email? brokennb The Lounge 0 09-17-04 04:32 PM
looking for reliable developers - HTML, Javascript, PHP, Database MaritimeSource Job Offers & Assistance 2 01-29-04 07:15 PM


All times are GMT -5. The time now is 08:43 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.