title: How to escape quotes in json within Microsoft Flow?
body: <p>I have a MS Flow to built an Adaptive Card out of a freshly generated Planner task. It works unless a title has double quotes in it. This breaks the json-code for the Adaptive Card.</p>
  
  <p>I tried to inject the @replace-function directly into the json-code, but it didn't work.</p>
  
  <p>This is my working (without quotes in the title of the task) example:</p>
  
  <pre><code>{
      "type": "AdaptiveCard",
      "body": [
          {
              "type": "TextBlock",
              "text": "@{triggerBody()?['title']}",
              "wrap": true
          },
      ],
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
      "version": "1.0"
  }
  </code></pre>
  
  <p>This is what I tried with replace:</p>
  
  <pre><code>{
      "type": "AdaptiveCard",
      "body": [
          {
              "type": "TextBlock",
              "text": "@{replace(@{triggerBody()?['title']},'\"','\\\"'}",
              "wrap": true
          }
      ],
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
      "version": "1.0"
  }
  </code></pre>
  
  <p>I hoped the replace function would replace the double quotes (") with an escaped blackslash-version (\").</p>
  
  <p>But the error in MS Flow says: Unable to get property 'properties' of undefined or null reference.</p>