avoiding tags in comments and post titles
Moderator: General Moderators
-
scarface222
- Forum Contributor
- Posts: 354
- Joined: Thu Mar 26, 2009 8:16 pm
avoiding tags in comments and post titles
Hey guys, quick question, was wondering if anyone knew a smart way to avoid users posting div tags or something in a topic title or comment that the browser will take literally, that will mess up the display of the page.
Re: avoiding tags in comments and post titles
Always run user input through htmlentities (better) or htmlspecialchars (okay) before displaying it.
-
scarface222
- Forum Contributor
- Posts: 354
- Joined: Thu Mar 26, 2009 8:16 pm