title: Displaying line breaks produced by html/template in Go on GAE
body: <p>My application is written in Go. A page of the application receives user data from an HTML text area which is saved to Google App Engine datastore as string data. Then, on another page of the application, it requires to display the data in the format that the user typed into the HTML text area or at least preserve the line breaks as the user hit enter key while typing the data into the HTML text field.</p>
  
  <p>I tried to use <code>&lt;pre&gt;</code> tag to display the preserved line breaks that user typed into the text field which worked fine. However, I found that there is a double tab </p>
  
  <blockquote>
    <p>\t\t</p>
  </blockquote>
  
  <p>inserted at the beginning of the string when using the <code>&lt;pre&gt;</code> tag which I could remove the double tab by using Javascript.</p>
  
  <p>My idea to keep the line breaks that users type into the text field is to use javascript replace function to replace all <code>\r\n</code>, <code>\n</code> and <code>\r</code>to <code>&lt;br&gt;</code>, however, it didn't work out. It seems like Go doesn't output the line breaks into the html source code. I am using "html/template" for safety reason but I didn't expect it to remove the <code>\r\n</code> characters from its output entirely. And is there any suggestion on the strange double tab <code>\t\t</code> at the beginning to the string? </p>