It sounds like you're saying that Smarty generates the proper HTML
which would be displayed correctly (e.g., you'd see "á" for the
á entity) if you just displayed it in a web page, but you're
saying that same HTML loaded by Ajax.Updater is actually showing the
entities (e.g., "á") rather than what they code for.

If Smarty is really generating and returning normal HTML, that
shouldn't happen, and so you'll want to look closely at Smarty's
output. For instance, this test page[1] loads the string "<p>This is
the HTML loaded via Ajax.Updater, which contains &quot;quotes&quot;,
an &amp;, an &aacute;, and an &mdash;.</p>​" from a different JSBin
entry via Ajax.Updater, and the result shows correctly as "This is the
HTML loaded via Ajax.Updater, which contains "quotes", an &, an á, and
an —."

So you'll want to take another look at what exactly Smarty is
generating and returning to Ajax.Updater. You can do that easily
enough by adding an `onSuccess` handler to the Ajax.Updater's options
and looking at the value of the response's `responseText` member in a
debugger (or, in a pinch, with `alert`), as in this updated
example[2]. Also worth using a tool like Firebug or Chrome's Dev
Tools, etc., to look at the HTTP response. Is it being served with the
right content type? (Although I'm not sure how much Ajax.Updater

[1] http://jsbin.com/ukasi3/2
[2] http://jsbin.com/ukasi3/3

T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Nov 22, 2:51 pm, pjsb <webmas...@primitive-visions.de> wrote:
> Hello,
> I use Prototype 1.6 in conjunction with Smarty 3. I habe also a MySql
> DB with several columns that contains chars like > or others that can
> be encoded with the php function: htmlentities
> I do not want to do a htmlentities before DB insert. The DB should
> contain no entitites just real text! The values comes from the DB
> trough Smarty, which transform them in their entity codes to have save
> display.
> The problem is, that if the HTML generated by Smarty website contains
> the correct entities. But if I use the response in Prototype's
> Ajax.Updater the entities afterwards are decoded.
> Is there a way to disable it? Like the evalJS parameter to avoid JS
> execution in ajax responses. Or is this a bug?

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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to