Re: Displaying HTML safely

From: Date: Sat, 16 Jul 2005 00:46:27 +0000
Subject: Re: Displaying HTML safely
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-218787@lists.php.net to get a copy of this message
Lauri Harpf wrote:
Now, if I make a point of not "chmod 755"ing the .html files in question, the server should be safe from someone feeding a html file with an embedded PHP script, right? Is there something else I should be looking out for - or is there an even better way of handling the transferring of the HTML code from the application to the user?
Well, unless you have set your server up to execute PHP or CGI scripts in .html files, which is a very bad idea, the only thing you need to worry about is client-side scripting. You could just filter out all <script></script> tags if client-side scripting isn't important for your application... Jasper

« previous php.general (#218787) next »