Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-3620

Syntax conversion does not treat escaped syntax characters correctly.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2, 1.9 M2
    • Labels:
      None
    • Environment:
      SunOS 5.11 snv_106 i86pc i386 i86pc
      Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
      apache-tomcat-6.0.18
    • keywords:
      syntax conversion String index out of range
    • Tests:
      Unit
    • Similar issues:

      Description

      Syntax conversion does not treat escaped syntax characters correctly, for example;

      Create an XWiki 1.0 syntaxc page with this text;

      Here are some \[square brackets\]

      Now change the syntaxId to 2.0 and hit ok to produce the following text;

      Here are some \[[square brackets\]]

      Now try to save or preview, and it fails and throws

      Exception: String index out of range

      I think the Exception is thrown in the course executing org.xwiki.rendering.block.AbstractFatherBlock.traverse() and it is trying to treat the text as a

      org.xwiki.rendering.block.LinkBlock

      with the actual exception being thrown in

      org.xwiki.rendering.internal.renderer.DefaultLinkLabelGenerator.generate()

      at line 59.

      Chris

        Attachments

          Activity

            People

            Assignee:
            tmortagne Thomas Mortagne
            Reporter:
            cmp Chris Phelan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: