I have a textarea on a page which contains notes as text. Html encoded
entities are encoded correctly for display in order to pass XHTML 1.0
strict validation (which is a company requirement).


<textarea name="listing_summary_header-old_notes"
id="listing_summary_header-old_notes" readonly="readonly" cols="50"
rows="5" style="width:320px; background: #EAF5F8;  height: 80px; font-
size: 0.7em;">
16/3/2009 - Vini Holden - 570 enqs - test
16/3/2009 - Vini Holden - 570 enqs - &amp;&amp;&amp;

Every 30 seconds a PeriodicalExecuter fires an Ajax call which checks
for new notes and updates the textarea using setValue if new notes are

var feature_code = 'listing_summary_header'
oResponse['listing_notes']['data'].each(function (listingNote) {

if (!listingNote) {

var d = new Date(listingNote['timestamp'] * 1000);
sListingNotes += d.getDate()+"/"+(d.getMonth()+1)+"/"+d.getFullYear()
+" - "+listingNote['user_full_name']+" - "+listingNote['text']+"\n";



Unfortunately after the textarea is updated, any html encoded
characters display as the html encode (eg &amp; instead of &). When I
use developer toolbar to view the generated source it appears to be
correct (no double encoding).

I routinely test in the following browsers:

Firefox 3.0.7
IE 7.0.6001.18000
Opera 9.52
Safari 3.1.2

The issue appears in all of the above in the same way. The encoding is
done on the array once before it is sent to the javascript via ajax
via JSON string.

Any thoughts?

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to