You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Steve O'Hara (JIRA)" <ji...@apache.org> on 2018/05/29 15:01:00 UTC

[jira] [Created] (VELOCITY-891) Upgrade to v2.0 causes parser failures

Steve O'Hara created VELOCITY-891:
-------------------------------------

             Summary: Upgrade to v2.0 causes parser failures
                 Key: VELOCITY-891
                 URL: https://issues.apache.org/jira/browse/VELOCITY-891
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.0
            Reporter: Steve O'Hara


We are upgrading from v1.7 to v2.0 but have come across a problem almost immediately.

Our templates can contain a lot of Javascript with references to things that begin with the '#' character e.g. Kendo JS templates. These used to be ignored by 1.7 but now they are causing parser failures as follows;

{{#set ($JQId = "#" + $Utils.getJQuerySelector($SparklineElementId))}}

{{org.apache.velocity.exception.ParseErrorException: Failed to parse String literal}}

It is complaining about the \{{"#"}}

I can't find any directive that switches this off or a way to circumvent it.

A workaround is to replace the '#' with {{$HASH}} but we have thousands of these and no way of fixing the end-user commited templates.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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