how to prevent xss attack

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
harsha
Forum Contributor
Posts: 103
Joined: Thu Jul 11, 2002 1:35 am
Location: Bengaluru (Bangalore) > Karnataka > India

how to prevent xss attack

Post by harsha »

how do i prevent xss attack by efficiently using regular expressions and pcre function in php.

i want to inster \n<br> after some number of characters coming from the form input so that the message doesn;t deface the table and entire appearance of the site by making the horizontal scroll of the windows more smaller
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Looked at wordwrap() ?
Post Reply