On 4/4/07, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
>
> 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.

It is mentioned in the docs now, and we provide the same workaround
that Dojo does.

> 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.

You can use the comment. Also, nothing stops you from parsing your own
JSON. It's a whopping one line of code to evaluate JSON. You might
have to write two whole lines of code if you want to do something
custom!

> 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;
> }
>

Well it'd be better just to use the /*comment*/ instead and not
override non-public functions.

-bob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
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