rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: Mars on December 17, 2007, 01:48:17 AM

Title: A very surprising bug
Post by: Mars on December 17, 2007, 01:48:17 AM
Small tpl with stange bug
Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode^=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 3 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 4 : if (true) {mycode|=2;} else {mycode^=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>
web page: on build 163
rejetto {{!one}} {{!two}} {{!three}} four end

same by deleting  one line
Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode^=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode^=2;}; break;
     case 3 : if (true) {mycode|=2;} else {mycode^=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>
web page: on build 163
rejetto {{!one}} {{!two}} three four end

It seems that the usage of several ¦ in this context is  the cause of bug when he is beetwen  {   }

Quote
<html>
<head>
{{!rejetto}}
<script language="javascript" type="text/javascript">
function changewhere(code){
    switch (code)
     { 
     case 1 : if (true) {mycode|=1;} else {mycode|=1;}; break;
     case 2 : if (true) {mycode|=2;} else {mycode=2;}; break;
     case 3 : if (true) {mycode=2;} else {mycode=2;}; break;
    default : mycode=0; break;
     }
}   
</script>
</head>
<body>
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}
</body>
</html>

web page: on build 160

macro error: !rejetto
{{!one}} {{!two}}
macro error: !three
macro error: !four
macro error: !end

but not
macro error: !rejetto
macro error: !one
macro error: !two 
macro error: !three
macro error: !four
macro error: !end

web page: on build 146
{{!one}} {{!two}} {{!three}} {{!four}} {{!end}}

why is the question!! ??? ???
Title: Re: A very surprising bug
Post by: rejetto on December 17, 2007, 03:24:23 PM
fixed in next beta

thank you for reporting