XWiki Platform
  1. XWiki Platform
  2. XWIKI-9656

The created application doesn't work if its name contains single quotes

    Details

    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Create an application with a name that contains a single quote, e.g. "John's Shop". The application is created successfully but it doesn't work:

      • adding a new entry is not possible because of a Velocity error
      • even if we manually create a new entry (by creating a plain wiki page and adding the required object) the live table doesn't work.

        Issue Links

          Activity

          Hide
          Marius Dumitru Florea added a comment -

          The issue is that the single quotes are not escaped when AppWithinMinues generates the Velocity code of the new application. You have for instance:

            'className': '$className',
          

          which generates

            'className': 'John's Shop.JohnsShopClass',
          

          The single quote must be escaped (by doubling it):

            'className': 'John''s Shop.JohnsShopClass',
          
          Show
          Marius Dumitru Florea added a comment - The issue is that the single quotes are not escaped when AppWithinMinues generates the Velocity code of the new application. You have for instance: 'className': '$className', which generates 'className': 'John's Shop.JohnsShopClass', The single quote must be escaped (by doubling it): 'className': 'John''s Shop.JohnsShopClass',

            People

            • Assignee:
              Marius Dumitru Florea
              Reporter:
              Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: