Uploaded image for project: 'Browser Developer Extensions'
  1. Browser Developer Extensions
  2. BDE-198

Fix invalid JSON produced when a note content references an image

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Acknowledged
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: Base Code

      Description

      Using nightly
      Create a note
      Reference an image in the note content
      Save

      Looking at the console when using web ui, the rest api call looks fine
      https://nightly.nuxeo.com/nuxeo/api/v1/path/default-domain/workspaces/Start%20Creating%20Your%20Cont/totonote

      note:note: <img src="https://nightly.nuxeo.com/nuxeo/nxfile/default/7ab68c6a-4a9f-4688-b580-bc2f8506d846/file:content/Beach.png?changeToken&#61;3-0" />

      Using Web UI and doing an XML export, the formatting looks fine

      Export the document as JSON using the browser extension or retrieve it using the REST API

      Content looks like:

       "properties": {
          "note:note": "<img src="\&quot;https://nightly.nuxeo.com/nuxeo/nxfile/default/793dc397-2ecc-46ee-8840-92d1d88faed6/file:content/Away.jpg?changeToken=3-0\&quot;"><img src="\&quot;https://nightly.nuxeo.com/nuxeo/nxfile/default/29cd982b-fcd4-4679-82db-921cdd737a80/file:content/Architecture.jpg?changeToken=3-0\&quot;">",
      

      The img src tag should only contain the escaped double quote and not additional quotes that could make the JSON invalid.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bchauvin Bertrand Chauvin
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: