Re: Heredoc inside eval?

From: Date: Sat, 14 Feb 2009 16:59:58 +0000
Subject: Re: Heredoc inside eval?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-288262@lists.php.net to get a copy of this message
Sorry for not including a a code example of the template. <html> .. <div>{$content}</div> This template I read into a variable using file_get_contents() so I don't think escaping php will work but I will have to test this. Your suggestion for the heredoc problem is simple, yet I didn't think of it :D Thanks for help, I'll post back when I have tested it. For others who come across this situation, the way I solved it was to simply use the addslashes()/stripslashes() functions as they only target double quotes by default. Should be (much?) less cpu intensive then using htmlspecialchars() as most of the html template would be altered.

« previous php.general (#288262) next »