if I create for example a page with the following content:
<body>
<p>
ABC DEF<p>GHI</p>
JKL<br>MNO
</p>
</body>
Then I get in the browser:
ABC DEF
GHI
JKL
MNO
But when I now use $('body').text()
then I get back:
ABC DEFGHI
JKLMNO
Is it possible to add an empty space between the elements? So that 'DEFGHI' and 'JKLMNO' are actually two words instead of one?
Here the link to a jsfiddle example.