Loading data using prototype.js <script> new Ajax.Updater('section_data', 'veil.html', {method:'get', evalScripts: true}); </script> --- veil.html (works fine) ------------- <p>This alert shows up just fine</p> <script type="text/javascript" charset="utf-8"> alert('Hello!'); </script> --- veil.html (didn't work) ------------- <p>This alert didn't fire up. And all script block didn't executed/eval'd</p> <script type="text/javascript" charset="utf-8"> alert('Привет!'); //<- any utf-8 (russian in my case) text </script> --- veil.html (didn't work too!) ------------- <p>This alert didn't fire up. And all script block didn't executed/eval'd</p> <script type="text/javascript" charset="utf-8"> alert('Hello!'); //коментарий <- any utf-8 (russian in my case) comment </script> ------------------------------------- Code above works in FireFox 2.0.0.6 (Mac), Opera 9.21 (Mac) Didn't works in Safari 2.0.4 (419.3), WebKit (25552, 25585) P.S. Eval something like code in the next few line works fine. Mean eval code with russian without loading it via AJAX/Prototype.js requests <script> eval('alert("привет!")'); </script>
Thanks for the bug report, Alexey. Which version of Prototype.js are you using?
Also, what content type does your web server use to serve the original page (with prototype.js included) as well as each of the veil.html examples? (The output of "curl -I URL" would be helpful.)
A live URL demonstrating the issue would also help investigating this.
Prototype.js is 1.5.1.1 "curl -I URL" result ----------------- $ curl -I http://itportal/visual_service/ HTTP/1.1 200 OK Date: Wed, 19 Sep 2007 08:35:27 GMT Server: Apache/2.0.55 (Ubuntu) mod_python/3.2.8 Python/2.4.4c1 Vary: Cookie Content-Type: text/html; charset=utf-8 And i can't give you a live URL - its WIP
Created attachment 16324 [details] test case
Confirmed with shipping 10.4.8 Safari/WebKit and with r25261. Still needs a reduction.
This has the same root cause as bug 10370. *** This bug has been marked as a duplicate of 10370 ***
Filed <http://dev.rubyonrails.org/ticket/9663>, hoping that a workaround can be implemented in Prototype.js.