Web Hosting, Design, & Coding forum

General discussion

Allowing HTML tags in user input...

by raa / February 16, 2004 1:43 AM PST

Hello,

I am creating a site that lets users enter text for their personal profile.

Being security conscious, I have opted to strip tags, including all javascript event handlers (onClick, etc). However, I would like to allow some text formatting tags. Here is a list of those tags:
b, br, center, font, h1 - h6, i, ol, p, pre, sub, sup, ul.

Is there something I should be concerned about by doing this?

TIA,
Richie.

Discussion is locked
You are posting a reply to: Allowing HTML tags in user input...
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Allowing HTML tags in user input...
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re:Allowing HTML tags in user input...
by R. Proffitt Forum moderator / February 16, 2004 2:29 AM PST
Collapse -
Re:Re:Allowing HTML tags in user input...
by raa / February 16, 2004 2:48 AM PST

Thanks.

I'm not sure the majority of my targeted visitors would be interested in learning new rules about ubb code. If there is no possible way somebody could use html attributes to invoke some action in browsers, then I'd stick with the html tags that I've chosen to allow.

You mentioned meta tags. They won't be able to use meta tags, since all tags would be automatically removed, except the ones that I allow.

Collapse -
[nt] Then you are done...
by R. Proffitt Forum moderator / February 16, 2004 2:53 AM PST

.

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

CNET FORUMS TOP DISCUSSION

Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?