Re: storing and then displaying HTML for update

From: Date: Fri, 25 Jul 2008 05:03:21 +0000
Subject: Re: storing and then displaying HTML for update
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-277285@lists.php.net to get a copy of this message
Rod Clay wrote: > I'm writing a php application which includes accepting and storing HTML > for routine display by the application. All of this seems to be working > fine. > > However, I also want to display the raw HTML for administrators of the > system to update as necessary. I just discovered that this does NOT > seem to be working. When I attempt to put this raw HTML into a textarea > field on my page, I get unpredictable results. It's probably not being escaped properly when it's being put in the textarea - which means a ">" in the content will close the textarea and start it's own tags etc. Try: $textarea_content = htmlspecialchars($content, ENT_QUOTES); -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#277285) next »