Re: storing and then displaying HTML for update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux