<p>In IE when I insert text into a <code>&lt;pre&gt;</code> tag the newlines are ignored:</p>

<pre><code>&lt;pre id="putItHere"&gt;&lt;/pre&gt;

&lt;script&gt;
function putText() {
   document.getElementById("putItHere").innerHTML = "first line\nsecond line";
}
&lt;/script&gt;
</code></pre>

<p>Using <code>\r\n</code> instead of a plain <code>\n</code> does not work. </p>

<p><code>&lt;br/&gt;</code> does work but inserts an extra blank line in FF, which is not acceptable for my purposes.</p>

```
<br/>
```
shoud only output one line in all browsers. Of course remove the \n as well, code should be:
```
```
document.getElementById("putItHere").innerHTML = "first line<br/>second line";
```
```