How would I use jQuery or plain JavaScript to remove the spaces before and after the <nospc/>
tag in the code below? (I realize I could simply remove the spaces manually, but sometimes it's convenient to have spaces and line breaks in the HTML that are not rendered.)
<div>
<img src="" /><nospc/>
<img src="" />
</div>
In a perfect world <nospc/>
would remove all white space before and after the itself, and <nospc> ... </nospc>
would remove all white space between the tag pair.