title: Escape single quote within double quote within single quote
body: <p>I am issuing a curl command that would ideally look like this (note that this is incorrect due to lack of escaping):</p>
  
  <pre><code>curl -X POST --data-urlencode 'payload={"channel": "@somebody", "text": "I'm sending you a test message. Let me know if you get it."}' https://hooks.slack.com/services/XXX
  </code></pre>
  
  <p>The single quote in the word I'm causes this to fail. However, I am unsure how to escape this quote since there are several levels of nested quotes.</p>
  
  <p>As a second question, what if there were double quotes inside the text string? How could those be escaped?</p>
  
  <p>I have read about escaping and looked at other SO posts (including <a href="https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings">How to escape single-quotes within single-quoted strings?</a>), but I can't seem to get any solutions to work. The linked post talks about single quotes in single quotes and solves that problem by using double quotes. However, my single quote is already in double quotes. So this is more complicated.</p>
  
  <p>Thanks so much for your help.</p>