I'm making a bookmarklet and have gotten a bit stuck, I'm trying to wrap a span around some text. Problem is the text has a fair amount of br
s in it which is causing me a headache.
Since its a bookmarklet I can only use jQuery to change the HTML. I only want to wrap the text below the mediablock (so I can truncate it) and not the mediablock itself.
Current HTML Structure below:
<div class="Message">
<div class="MediaBlock">
<h2>name</h2>
</div>
This is the text
<br> I want to wrap
<br> With a span, class more  
</div>
I should have mentioned that along with br's there are links as well, also their are multiple message containers on one page.
The message is also variable length, its user generated