Details

    • Application Servers:
      Apache Tomcat 9.0.x

      Description

      Hi,

      I've got a problem when I configure one of my VueJs portlet.
      I've followed the documentation : https://portal.liferay.dev/docs/7-2/reference/-/knowledge_base/r/configuration-json-available-options

      Everything worked fine until I inserted a single quote in my string configuration value.
      Debugging throw Chrome I saw this :

       

      if (initializer) {
        initializer({
          configuration: {
           portletInstance: JSON.parse('{"testTitre":"modèle de titre avec l'apostrophe"}'),
          system: JSON.parse('{}')
         },
         contextPath: '/o/tableau-de-bord',
         portletElementId: 'js-portlet-INSTANCE_2Qv9DmKM3Vxc',
         portletNamespace: 'INSTANCE_2Qv9DmKM3Vxc'
        });
      }

       

      The single quote is not escaped and then the JSON.parse can't work because the JSON is malformed.

       

        Attachments

        1. Capture.PNG
          Capture.PNG
          18 kB
        2. configuration.json
          1 kB
        3. tableau-de-bord-generique.zip
          13.83 MB

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            portail.agrial Axel LEFEVRE
            Participants of an Issue:
            Recent user:
            Axel LEFEVRE
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 26 weeks, 4 days ago

                Packages

                Version Package