This project is archived and is in readonly mode.

Response can't leave script tags in place
Reported by cheppner | May 5th, 2011 @ 12:30 PM
Hello,
I tried to use Request for some ajax content insertion (Request.HTML did no better). When the answer contained a javascript captcha it was removed when I inserted the html (via innerHTML = ...).
I had the choice between evalRequest and evalScripts to change
this behaviour. evalRequest did what I want in Firefox and
Safari:
It left the script tags in place so that I could do some magic to
get them working again (innerHtml assignments don't really work
with scripts).
However - this evaluated the whole response which failed in Chrome because the response did contain html and not javascript. What I really wanted was something like evalScripts=false which leaves the script tags in place.
Request.implement({
processScripts: function(text){
return text;
}
});
Did the trick for me but I think there should be another flag or something.
Bye,
- CH
Comments and changes to this ticket
-
fakedarren July 16th, 2011 @ 04:01 PM
- State changed from new to open
- Assigned user set to fakedarren
-
ibolmo January 19th, 2012 @ 09:42 AM
- State changed from open to invalid
Moved to Github Issues: https://github.com/mootools/mootools-core/issues/2220
Please use Github Issues, since Lighthouse has been deprecated.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »