Escape quotes in Webhook payload

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ x] Documentation issue or request

Current behavior


If have a web hook for my app that sends my system updates on changes made in the CMS.
In our custom payload we include the title of the content item that was changed.

                        "type": "${CONTENT_TYPE}",
                        "contentId": "${CONTENT_ID}",
                        "modifiedBy": "${USER_ID}",
                        "libraryId": "${APP_NAME}",
                        "contentTitle": "${CONTENT_DATA.title.iv}",

The above snippet is what is configured in squidex.
This works for most payloads, however if I include a title like my "title it breaks the JSON.

Is there anyway to configure the web hook to escape the data in custom fields?


You can use

   "type": "${CONTENT_TYPE | escape}",
   "contentId": "${CONTENT_ID | escape}",
   "modifiedBy": "${USER_ID | escape}",
   "libraryId": "${APP_NAME | escape}",
   "contentTitle": "${CONTENT_DATA.title.iv | escape}",

I have improved the docs for that:


Thanks that did the trick :slight_smile: