I want to properly copy my data from my contenteditable div so that i can submit it to my database. this will be for a post similar to Facebook. My code looks like this:

```
<div id="urlinput" class="isPlaceholder" role="textbox" spellcheck="true"   aria-multiline="true"  data-placeholder-default="This is the Status text" contenteditable="true">
</div>

```

and after some data is typed in, the html looks like this:

```
<div id="urlinput" class="isPlaceholder" role="textbox" spellcheck="true" aria-multiline="true" data-placeholder-default="This is the Status text" contenteditable="true">This is line one<div>This is line two</div><div>This is line 3</div><div><br></div></div>

```

Since with contenteditable divs every line is separated with another div, whats the best way to go about doing this safely and still keeping the structure so when I pull the data later from my database it still stays formatted the same way when i put it in the view.