I want to parse some `HTML` using `BeautifulSoup` and replace any line breaks (`\n`) that are within `<blockquote>` tags with `<br>` tags. It is extra difficult because the `<blockquote>` may contain other HTML tags.

My current attempt:

```py
from bs4 import BeautifulSoup

html = """
<p>Hello
there</p>
<blockquote>Line 1
Line 2
<strong>Line 3</strong>
Line 4</blockquote>
"""

soup = BeautifulSoup(html, "html.parser")

for element in soup.findAll():
    if element.name == "blockquote":
        new_content = BeautifulSoup(
            "<br>".join(element.get_text(strip=True).split("\n")).strip("<br>"),
            "html.parser",
        )
        element.string.replace_with(new_content)

print(str(soup))

```

Output should be:

```html
<p>Hello
there</p>
<blockquote>Line 1<br/>Line 2<br/><strong>Line 3</strong><br/>Line 4</blockquote>

```

However, this code, adapted from [this answer](https://stackoverflow.com/a/68580682/250962) only works if there are no HTML tags within the `<blockquote>`. But if there are (the `<strong>Line 3</strong>`) then `element.string` is `None`, and the above fails.

Is there an alternative that can cope with HTML tags?