This project is archived and is in readonly mode.

#512 ✓resolved
Domen Kožar

evalScripts and Request

Reported by Domen Kožar | December 7th, 2008 @ 09:01 PM | in 1.2.2

I lost 2 hours because of not looknig to source. But, here is the problem:

In Request documents it is stated: evalScripts - (boolean: defaults to true) If set to true, script tags inside the response will be evaluated.

and here is the snippet from Mootools:


	processScripts: function(text){
		if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text);
		return text.stripScripts(this.options.evalScripts);
	},

	success: function(text, xml){
		this.onSuccess(this.processScripts(text), xml);
	},

as you can see, javascript is evaluated only when http request header matches that regex.

Comments and changes to this ticket

  • Jan Kassens

    Jan Kassens December 7th, 2008 @ 09:25 PM

    • Milestone changed from 2.0 to 1.2.2
    • State changed from “new” to “resolved”
    • Assigned user changed from “Valerio” to “Jan Kassens”

    It's an OR, but the default value was wrong in the docs for Request, I've fixed the docs.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages