FullCalendar Macro
  1. FullCalendar Macro
  2. FULLCAL-8

Invalid JSON when there are double quotes in the document name

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.8
    • Fix Version/s: 1.1.9
    • Labels:
      None
    • Similar issues:

      Description

      For a document containing double quotes in its name, for instance

      Meeting.Some doc "Double Quotes" 

      , the id in the generated JSON is

      "id": "Some doc "Double Quotes""

      . As a results, the calendar doesn't display any event. Using

      "${escapetool.javascript($itemdoc.fullName)}"

      should fix this.

        Activity

        Hide
        Clemens Robbenhaar added a comment -

        Looks similar to MOCCACAL-49 - maybe a similar solution is (ie. using $jsontool.serialize(<map>) instead of having to escape each entry separately is an option, too.

        Show
        Clemens Robbenhaar added a comment - Looks similar to MOCCACAL-49 - maybe a similar solution is (ie. using $jsontool.serialize(<map>) instead of having to escape each entry separately is an option, too.
        Hide
        Raluca Moisa added a comment -

        The is a double escaping for the document title in

        "title" : "${escapetool.javascript($escapetool.xml($itemdoc.plainTitle))}"
        Show
        Raluca Moisa added a comment - The is a double escaping for the document title in "title" : "${escapetool.javascript($escapetool.xml($itemdoc.plainTitle))}"
        Show
        Raluca Moisa added a comment - Fixed in https://github.com/xwiki-contrib/macro-fullcalendar/commit/5d7d12e23f2d8f0af8de6c730e6134df842b8bfe

          People

          • Assignee:
            Raluca Moisa
            Reporter:
            Raluca Moisa
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: