I am importing a facebook RSS feed and many posts have no name. Therefore, in this case, I want to pull some content from the body and use it as a name. The problem is that the contents of the body may look like this ...
Lorem ipsum<br>www.youtube.com<br>dolor sit amet.
I canβt just remove the br tags because it will become a run in the sentence. I would rather replace tags with a single space or comma with a space. I tried the following code, but it does not seem to work.
$('.teaser-title br').replaceWith(' ');
Thoughts?
source share