Yup, it does.  I pass back and forth a json object and if debug is > 0
I get an invalid json object because of the timestamp.

I've written two little functions I like to use for cleaning off that
timestamp for while I'm developing:  First I use if its an xml file I
want to parse, second is if I want to clean a json object in
particular since its a tad bit faster.

var CakeCleaner = {
  clearTimeStamp: function(text){
    var end = text.indexOf('<!--');
    if(end != -1){ //we have a time stamp, clean it off.
      text = text.substring(0,end);
    }
    return text;
  },

  cleanJson: function(text){
    var end = text.lastIndexOf('}');
    return text.substring(0, end + 1);
  }
};

I use prototype, and like to wrap things in hashes, but its basic
enough it can stand on its own, you get the picture I hope.

Hope that helps,
Nick

On Mar 19, 3:49 am, Gideon <[email protected]> wrote:
> Ahh... Okay. The only problem is that it might play havoc with
> Javascript files no?
>
> On Mar 19, 5:48 am, Miles J <[email protected]> wrote:
>
>
>
> > It only shows up if debug is greater than 0.
>
> > On Mar 18, 2:53 pm, Gideon <[email protected]> wrote:
>
> > > Hi all,
>
> > > Every time a view is rendered I get an HTML-style comment with a time
> > > in it (presumably the execution time of the page). How do I get rid of
> > > this?
>
> > > Thanks.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to