title: Unable to parse JSON string in JavaScript
body: <p>I'm sending JSON string from Django view to javascript file named <code>idbop.js</code> at the client side. I'm using the serializer in Django to convert query result in Django to JSON. Here is my code in views.py of Django</p>
  
  <pre><code>def index(request):
  template='posts/index.html'
  results=feed.objects.all()
  jsondata = serializers.serialize('json',results)
  context={
      'results':results,
      'jsondata':jsondata,
  }
  return render(request,template,context)
  </code></pre>
  
  <p>At client side, I'm accessing <code>jsondata</code> in javascript as follows:</p>
  
  <pre><code>var jsondata="{{jsondata}}".replace(/&amp;quot;/g,"\"");
  </code></pre>
  
  <p>Here jsondata is in string format. If I try to parse it using, <code>var data = JSON.parse(jsondata);</code> It is throwing an error:<code>SyntaxError: JSON.parse: bad control character in string literal at line 1 column 344 of the JSON data</code> 
  I'm having whitespace at 344 in <code>jsondata</code> but that whitespace is inside the string of value.
  Here is my JSON string: </p>
  
  <pre><code>[
      {
          "model": "posts.feed",
          "pk": 1,
          "fields": {
              "author": "J Watson",
              "title": "Service Worker",
              "body": "A service worker is a type of web worker. It&amp;#39;s essentially a JavaScript file that runs separately from the main browser thread, intercepting network requests, caching or retrieving resources from the cache, and delivering push messages.
  
  Because workers run separately from the main thread, service workers are independent of the application they are associated with. This has several consequences:"
          }
      }]
  </code></pre>