Re: HTML in MySQL?

From: Date: Wed, 29 Nov 2000 05:05:05 +0000
Subject: Re: HTML in MySQL?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27773@lists.php.net to get a copy of this message
Hi Y'all: Ignacio Vazquez-Abrams wrote: > > It's when it comes > time to output the code. If you have untrusted users entering data, it is > possible that they could put malicious HTML (<script>top.close()</script>, for > example) into the database. Then come time to print it out, well, you know. > > The ways to avoid that are: > > 1) Only allow trusted users to enter raw HTML, and > 2) Use htmlspecialchars() on untrusted data. Even trusted users can become malicioius. A better solution is my SQL Solution class. It has a Safe Markup Language, with which users use mock HTML tags. On the way to the user, the SQL Solution converts the mock tags to real tags. For more info, check out the manual: http://www.analysisandsolutions.com/code/sql/sql-man.htm#safe Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#27773) next »