Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-2863

Template values can not contain $

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 1.4
    • 1.3.5
    • None

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmiller@atlassian.com Charles Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: