Re: [SMARTY-DEV] Bug with debug and array-key with newline

From: Date: Mon, 21 Apr 2003 16:18:06 +0000
Subject: Re: [SMARTY-DEV] Bug with debug and array-key with newline
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1247@lists.php.net to get a copy of this message
committed patch. now \n\r\t show up literally escaped as \n\r\t in the debug console. On Mon, 2003-04-21 at 10:40, Tom Sommer wrote: > Consider this > > $vars = array(); > $vars["this"] = that; > $vars["\ntest"] = "hello"; > > $smarty->assign('varlist', $vars); > > Once the debug popup is written, it will produce a javascript error such > as: > > Error: unterminated string literal > Line: 300, Column: 34 > Source Code: > _smarty_console.document.write("<tr bgcolor=#fafafa><td > valign=top><tt><font > color=blue>{$varlist</font></tt></td><td > nowrap><tt><font color=green><b>Array (31)</b><br>\r<b> > > > PS. No I don't have \n in my array-keys, I found this bug because of a bug > in my code > -- > Tom Sommer, Denmark > www.tsn.dk - www.dreamcoder.dk -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#1247) next »