Hi all,

This is an interesting discussion, and the issue is something
developers need to be aware of. I'm not going to pass judgement on if
it should be blamed on frameworks (client-side or otherwise).

I think we should mention it in the docs. Beyond that I don't care.

On 4/4/07, Victor Bogado <[EMAIL PROTECTED]> wrote:
> It is my opinion after reading the articles about this problem that
> having a URL that returns JSON from a DB (I am not talking about sql
> injections here) is a stupid mistake and if I want to use motchkit in
> all it's capabilities, for now, I have to make this "stupid mistake",
> I can't even use the documented work around of putting a "while(1)" or
> comment the json that my server side app will put out.

Well, you *can* do almost anything, just override loadJSONDoc to do
what you want - it's less than 10 lines of code.

With Bob's recent addition of MochiKit.Base._filterJSON you can just
redefine that to your liking. If you want to use "while(1);" do this:

MochiKit.Base._filterJSON = function (s) {
    var m = s.match(/^\s*while\(1\);\s*(.*)\s*$/);
    if (m) {
        return m[1];
    }
    return s;
}

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to