title: AEM Servlet response writter removing links
body: <p>In AEM, I'm trying to write a JSON object that contains a string object via a get servlet, like this:</p>
  
  <pre><code>response.setContentType("application/json");
  response.setCharacterEncoding("UTF-8");
  response.getWriter().write(jsonObject.toString());
  </code></pre>
  
  <p>Response being of type SlingHttpServletResponse</p>
  
  <p>When the servlet is accessed in a browser the  is stripped with a warning coming out of the aem log:</p>
  
  <pre><code>03.08.2015 16:55:27.359 *WARN* [127.0.0.1 [1438617327343] GET /bin/integration.json HTTP/1.1] com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl Ignoring malformed URI: java.net.URISyntaxException: Illegal character in path at index 0: \
  </code></pre>
  
  <p>Link checker is bypassed for a lot of patterns including the link above.</p>
  
  <p>For example the string object inside the json:</p>
  
  <pre><code>pageIntro:'this &lt;a href="http://www.domain.com/my-section/page.html"&gt;link&lt;/a&gt;  doesn't work' 
  </code></pre>
  
  <p>becomes: </p>
  
  <pre><code>pageIntro:'this link&lt;/a&gt;  doesn't work' 
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Cheers,
  Alex</p>