Another javascript/strip bug
| From: | Graham Yardley | Date: | Fri, 25 Mar 2005 22:21:56 +0000 |
| Subject: | Another javascript/strip bug | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-12372@lists.php.net to get a copy of this message | ||
FYI When using the SMARTY 2.6.8 strip command on a javascript if/else structure when there are no parenthesis around the else condition, there is no whitespace inserted between the else and the first statement.
Example:
{strip}
<SCRIPT LANGUAGE="JAVASCRIPT1.1"><!--
if (fv == 0)
fc.options[0] = new Option("Any", "0", true, false);
else
fc.options[0] = new Option("Any", "0", false, false);
{/strip}
Result:
if (fv == 0)fc.options[0] = new Option("Any", "0", true, false);elsefc.options[0] = new Option("Any", "0", false, false);
Expected Result:
if (fv == 0)fc.options[0] = new Option("Any", "0", true, false);else fc.options[0] = new Option("Any", "0", false, false);