|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
cybot Smarty Regular
Joined: 20 Apr 2005 Posts: 83
|
Posted: Thu Oct 26, 2006 2:12 pm Post subject: " in variable names causing javascript error in debug o |
|
|
" in variable names is not escaped in JavaScript commands
reproduce:
Code: | $smarty->assign('"0"', 0);
|
let smarty open debug window ({debug} in template or any other way)
JavaScript error:
Code: | missing ) after argument list
_smarty_console.document.write("<tr bgcolor=#fafafa><td valign=top><tt><font color=blue>{$"0"}</font></tt></td><td nowrap><tt><font color=green>"0"</font></tt></td></tr>"); |
|
|
Back to top |
|
cybot Smarty Regular
Joined: 20 Apr 2005 Posts: 83
|
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Nov 02, 2006 7:52 pm Post subject: |
|
|
@cybot: This doesn't seem to fix anything for me. |
|
Back to top |
|
cybot Smarty Regular
Joined: 20 Apr 2005 Posts: 83
|
Posted: Mon Nov 06, 2006 1:27 pm Post subject: |
|
|
doing
Code: | $smarty->assign('"0"', 0); |
without the patch gives me a JavaScript error, patched this error is gone when printing the debug console
@boots: you still get the JavaScript error mentioned above with the patch? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Nov 06, 2006 6:41 pm Post subject: |
|
|
I didn't try that. I tried your patch on one of my sites that uses JS heavily (including generated JS). Turning on debugging (with or without the patch) breaks the site (never-mind the debugger). I suppose you weren't trying to patch *my* problem |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
cybot Smarty Regular
Joined: 20 Apr 2005 Posts: 83
|
Posted: Wed Nov 08, 2006 7:00 am Post subject: |
|
|
thanks |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|