You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Fionn Ziegler (Issue Comment Edited) (JIRA)" <de...@velocity.apache.org> on 2011/11/29 16:04:40 UTC

[jira] [Issue Comment Edited] (VELOCITY-555) Escape quotes in interpolated strings (both ' and ") by doubling them ('' and "")

    [ https://issues.apache.org/jira/browse/VELOCITY-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159302#comment-13159302 ] 

Fionn Ziegler edited comment on VELOCITY-555 at 11/29/11 3:03 PM:
------------------------------------------------------------------

Hi together,
I'm not sure whether this is the correct way to ask or if that is related but it would be really helpful if you could point me to the correct direction. After upgrading the velocity version to 1.7 I get:

Lexical error,   Encountered: "u" (117), after : "" at velocity/mediaImpexTemplate.vm[line 58, column 50]
for:
 engine.getTemplate("mediaImpexTemplate.vm", "UTF-8");

the respective line is:
...
57: ## specifically remove any media code weve been given to ensure the change will sync
58: REMOVE PGMedia;code[unique=true];$catalogVersion[unique=true]

Any idea what I'm doing wrong here?

Thanks,
Fionn

                
      was (Author: fionnziegler@gmail.com):
    Hi together,
I'm not sure whether this is the correct way to ask or if that is related but it would be really helpful if you could point me to the correct direction. After upgrading the velocity version to 1.7 I get:

Lexical error,   Encountered: "u" (117), after : "" at velocity/mediaImpexTemplate.vm[line 58, column 50]
for:
 engine.getTemplate("mediaImpexTemplate.vm", "UTF-8");

the respective line is:
...
57: ## specifically remove any media code weve been given to ensure the change will sync
58: REMOVE PGMedia;code[unique=true];$catalogVersion[unique=true]

Any idea what I'm doing wrong here?

Thanks,
Fionn
Fionn

                  
> Escape quotes in interpolated strings (both ' and ") by doubling them ('' and "")
> ---------------------------------------------------------------------------------
>
>                 Key: VELOCITY-555
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-555
>             Project: Velocity
>          Issue Type: New Feature
>    Affects Versions: 1.5
>            Reporter: Nathan Bubna
>             Fix For: 1.7, 2.x
>
>         Attachments: velocity-555.patch
>
>
> More than a few years, the issue of escaping quotes in interpolated strings was discussed at some length.  Eventually, the list came to a consensus that we should escape them by doubling them, since this would be (or at least very nearly be) backwards compatible and provide a simple solution for this much-wanted feature.
> Geir had working code for this and even posted a test jar, IIRC.  So, many of us thought that this had made it into the 1.5 codebase.   But the code never got checked in and may have been lost.  Assuming Geir can't find the old code or the time to duplicate the effort, we should still try to implement this.
> This issue is open to remind us of that.  If i get around to digging up links to the relevant threads, i will post those in the comments of this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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