|
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 |
orao Smarty Rookie
Joined: 23 Dec 2009 Posts: 20
|
Posted: Thu Dec 24, 2009 10:20 am Post subject: Smarty is replacing single quotes with double |
|
|
Smarty translates this:
Code: | <input type="radio" onclick="javascript:my_function('blabla')" |
to this
Code: | <input type="radio" onclick="javascript:my_function("blabla")" |
It is changing single quotes to double.
Browser is giving me javacript error because of this.
How can that be fixed? |
|
Back to top |
|
orao Smarty Rookie
Joined: 23 Dec 2009 Posts: 20
|
Posted: Thu Dec 24, 2009 12:45 pm Post subject: |
|
|
I just found out this happening only inside recursion
Code: | {function name=menu level=0}
<ul class="level{$level}">
{foreach $data as $entry}
{if is_array($entry)}
<li>
<input type="radio" onclick="javascript:my_function('blabla')"
{$entry@key}</li>
{menu data=$entry level=$level+1}
{else}
<li>{$entry}</li>
{/if}
{/foreach}
</ul>
{/function} |
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Dec 24, 2009 1:10 pm Post subject: |
|
|
There is already a bugfix for this in the SVN. |
|
Back to top |
|
orao Smarty Rookie
Joined: 23 Dec 2009 Posts: 20
|
Posted: Thu Dec 24, 2009 1:37 pm Post subject: |
|
|
mr. U.Tews, thank you very very much |
|
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
|