Template values can not contain $

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 1.4
    • Affects Version/s: 1.3.5
    • Component/s: None

      Steps to reproduce:

      Create a template with a variable: @ONE@
      Create a new page from the template, making the value of the variable 1$2

      Boom:

      java.lang.IndexOutOfBoundsException: No group 3
      at java.util.regex.Matcher.group(Matcher.java:355)
      at java.util.regex.Matcher.appendReplacement(Matcher.java:585)
      at java.util.regex.Matcher.replaceAll(Matcher.java:661)
      at java.lang.String.replaceAll(String.java:1663)
      at com.atlassian.confluence.pages.templates.DefaultPageTemplateManager.mergeVariables(DefaultPageTemplateManager.java:116)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)
      at com.atlassian.confluence.util.profiling.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
      at $Proxy14.mergeVariables(Unknown Source)
      at com.atlassian.confluence.pages.actions.PageVariablesAction.doEnter(PageVariablesAction.java:66)

              Assignee:
              Unassigned
              Reporter:
              Charles Miller (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: