You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Dan Ertman (JIRA)" <de...@velocity.apache.org> on 2007/06/01 00:29:15 UTC

[jira] Created: (VELOCITY-552) Lost $ within literal blocks when not followed by alpha

Lost $ within literal blocks when not followed by alpha
-------------------------------------------------------

                 Key: VELOCITY-552
                 URL: https://issues.apache.org/jira/browse/VELOCITY-552
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.5
         Environment: Windows XP or Solaris, JDK 1.4.2_10
            Reporter: Dan Ertman


This is probably the same root cause as #355 (lost #s).
I was happy to find the #literal() directive in the user guide, because I intend to output SH script from Velocity, which could otherwise get messy. Unfortunately, under certain circumstances, $s are being gobbled.
Consider this VTL fragment:
#literal()
export $VAR=$(echo $testme)
#end

Run through evaluate, this spits out
export $VAR=(echo $testme)

which isn't very literal (and is a compilation fault in SH). Even more odd, 
#literal()
export $VAR=\$(echo $testme)
#end

outputs
export $VAR=\(echo $testme)

Did some further testing on it, and if the $ isn't followed by alpha, it gets gobbled, but only inside a literal block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Resolved: (VELOCITY-552) Lost $ within literal blocks when not followed by alpha

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-552.
-----------------------------------

    Resolution: Duplicate

This is indeed a duplicate of VELOCITY-355, as Dan suspected.  Fix to follow shortly...

> Lost $ within literal blocks when not followed by alpha
> -------------------------------------------------------
>
>                 Key: VELOCITY-552
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-552
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Windows XP or Solaris, JDK 1.4.2_10
>            Reporter: Dan Ertman
>             Fix For: 1.6
>
>         Attachments: Velocity552TestCase.java
>
>
> This is probably the same root cause as #355 (lost #s).
> I was happy to find the #literal() directive in the user guide, because I intend to output SH script from Velocity, which could otherwise get messy. Unfortunately, under certain circumstances, $s are being gobbled.
> Consider this VTL fragment:
> #literal()
> export $VAR=$(echo $testme)
> #end
> Run through evaluate, this spits out
> export $VAR=(echo $testme)
> which isn't very literal (and is a compilation fault in SH). Even more odd, 
> #literal()
> export $VAR=\$(echo $testme)
> #end
> outputs
> export $VAR=\(echo $testme)
> Did some further testing on it, and if the $ isn't followed by alpha, it gets gobbled, but only inside a literal block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-552) Lost $ within literal blocks when not followed by alpha

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELOCITY-552:
----------------------------------

    Attachment: Velocity552TestCase.java

Here's a simple test case for the issue.

> Lost $ within literal blocks when not followed by alpha
> -------------------------------------------------------
>
>                 Key: VELOCITY-552
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-552
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Windows XP or Solaris, JDK 1.4.2_10
>            Reporter: Dan Ertman
>             Fix For: 1.6
>
>         Attachments: Velocity552TestCase.java
>
>
> This is probably the same root cause as #355 (lost #s).
> I was happy to find the #literal() directive in the user guide, because I intend to output SH script from Velocity, which could otherwise get messy. Unfortunately, under certain circumstances, $s are being gobbled.
> Consider this VTL fragment:
> #literal()
> export $VAR=$(echo $testme)
> #end
> Run through evaluate, this spits out
> export $VAR=(echo $testme)
> which isn't very literal (and is a compilation fault in SH). Even more odd, 
> #literal()
> export $VAR=\$(echo $testme)
> #end
> outputs
> export $VAR=\(echo $testme)
> Did some further testing on it, and if the $ isn't followed by alpha, it gets gobbled, but only inside a literal block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELOCITY-552) Lost $ within literal blocks when not followed by alpha

Posted by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Will Glass-Husain updated VELOCITY-552:
---------------------------------------

    Fix Version/s: 1.6

Thanks for reporting this.  Targeting a bug fix for 1.6

> Lost $ within literal blocks when not followed by alpha
> -------------------------------------------------------
>
>                 Key: VELOCITY-552
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-552
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Windows XP or Solaris, JDK 1.4.2_10
>            Reporter: Dan Ertman
>             Fix For: 1.6
>
>
> This is probably the same root cause as #355 (lost #s).
> I was happy to find the #literal() directive in the user guide, because I intend to output SH script from Velocity, which could otherwise get messy. Unfortunately, under certain circumstances, $s are being gobbled.
> Consider this VTL fragment:
> #literal()
> export $VAR=$(echo $testme)
> #end
> Run through evaluate, this spits out
> export $VAR=(echo $testme)
> which isn't very literal (and is a compilation fault in SH). Even more odd, 
> #literal()
> export $VAR=\$(echo $testme)
> #end
> outputs
> export $VAR=\(echo $testme)
> Did some further testing on it, and if the $ isn't followed by alpha, it gets gobbled, but only inside a literal block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org