title: Inconsistent line breaks when posting to instagram
body: <p>We are posting to Instagram; line breaks work one way (js), but don't work when processed server-side (php): why is this?</p>
  
  <p>We have created a server side app that creates and schedules posts with Hootsuite, and we post with Twitter, Instagram and Facebook.</p>
  
  <p>Say if this were the post:</p>
  
  <p>I am line 1.</p>
  
  <p>I am line 2.</p>
  
  <p>I am ine 3.</p>
  
  <p>It will be sent to Hootsuite and then posted to the appropriate platform; it appears like that on Twitter and Facebook. However when posting to Instagram, it appears as such:</p>
  
  <p>I am line 1.I am line 2.I am line 3.</p>
  
  <p>Line breaks are ignored (not always the case, but the first few certainly are).</p>
  
  <p>We have noticed that if we send the post to Hootsuite, and prior to publishing, we run the text through <a href="http://apps4lifehost.com/Instagram/CaptionMaker.html" rel="nofollow noreferrer">this</a>: it fixes the problem.</p>
  
  <p>Below are the two ways that line breaks are being introduced: (php for our app, js for the linked website)</p>
  
  <pre><code>    &lt;?php
      // outputted wherever line breaks are necessary
      $output .= "I am string \r\nEnd of string";
      ?&gt;
  
      &lt;script&gt;
      // Example using the copyToClipboard() function from http://apps4lifehost.com/Instagram/CaptionMaker.html
  
      var str = "I am text
  
      End of string";
      str.replace(/(?:\r\n|\r|\n)/g, "\u2063\n");
      &lt;/script&gt;
  </code></pre>
  
  <p>The php method of inserting breaks works for all other platforms, and in the Hootsuite preview, but then doesn't work once posted to instagram. However the JS one does.</p>
  
  <p>We need to use the PHP method to make the process more efficient, so how can we do this?</p>
  
  <p>Sorry if information is lacking; the project is confidential, so we can provide more information if necessary: please just ask and I will edit the question.</p>